Part Number Hot Search : 
74LVX273 IRF7807V CR12A AWA8820 44S150 CG75L LBS06607 74LV1G
Product Description
Full Text Search
 

To Download TMP92CD54I Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 TMP92CD54I
CMOS 32-bit Micro-controller
TMP92CD54IF 1. Outline and Device Characteristics
TMP92CD54I is high-speed advanced 32-bit micro-controller developed for controlling equipment which processes mass data. TMP92CD54I is a micro-controller which has a high-performance CPU (900/H1 CPU) and various built-in I/Os. TMP92CD54I is housed in a 100-pin mini flat package. Device characteristics are as follows: (1) CPU : 32-bit CPU(900/H1 CPU) Compatible with TLCS-900,900/L,900/L1,900/H,900/H2's instruction code 16Mbytes of linear address space General-purpose register and register banks Micro DMA : 8channels (250ns / 4bytes at fc = 20MHz, best case) Minimum instruction execution time : 50ns(at 20MHz) Internal data bus : 32-bit Internal memory Internal RAM : 32K-byte Internal ROM : 512K-byte Mask ROM
(2)
92CD54I-1
2006-01-27
TMP92CD54I
(3) External memory expansion 16M-byte linear address space (memory mapped I/O) External data bus : 8bit(for external I/O expansion) * Can't use upper address bus when built-in I/Os are selected Memory controller (MEMC) Chip select output : 1 channel (5) 8-bit timer : 8 channels 8-bit interval timer mode (8 channels) 16-bit interval timer mode (4 channels) 8-bit programmable pulse generation (PPG) output mode (4 channels) 8-bit pulse width modulation (PWM) output mode (4 channels) 16-bit timer : 2 channels 16-bit interval timer mode 16-bit event counter mode 16-bit programmable pulse generation (PPG) output mode Frequency measurement mode Pulse width measurement mode Time differential measurement mode Serial interface (SIO) : 2 channels I/O interface mode Universal asynchronous receiver transmitter (UART) mode Serial expansion interface (SEI) : 1 channel Baud rate 4/2/0.5Mbps at fc=20MHz. Serial bus interface (SBI) : 3 channels Clocked-synchronous 8-bit serial interface mode I2C bus mode (10) CAN controller : 1channel Supports CAN version 2.0B. 16 mailboxes (11) 10-bit A/D converter (ADC) : 12 channels A/D conversion time 8sec @fc=20MHz. Total tolerance +/- 3LSB (excluding quantization error) Scan mode for all 12channels (12) Watch dog timer (WDT) (13) Timer for real-time clock (RTC) Can operate with only low frequency oscillator. (14) Interrupt controller (INTC) : 60 interrupt sources 9 interrupts from CPU 42 internal interrupt vectors 9 external interrupt vectors (15) I/O Port : 68pins (16) Standby mode Four modes : IDLE3,IDLE2,IDLE1 and STOP STOP mode can be released by 9 external inputs. (17) Internal voltage detection flag (RAMSTB) (9)
(4)
(6)
(7)
(8)
92CD54I-2
2006-01-27
TMP92CD54I
(18) Power supply voltage VCC5 = 4.5V to 5.25V VCC3 = 3.3V (VCC3 Connect to REGOUT; built-in voltage regulator.) (19) (20) Operating temperature : -40 to 85 degree C Package : P-LQFP100-1414-0.50F
92CD54I-3
2006-01-27
TMP92CD54I
PG0toPG7 (AN0toAN7) PL0toPL3 (AN8toAN11) ADVCC ADVSS VREFH VREFL (TXD0)PF0 (RXD0)PF1 (SCLK0/ CTS0 )PF2 (TXD1)PF3 (RXD1)PF4 (SCLK1/ CTS1 )PF5 (TX)PF6 (RX)PF7 (TI0/INT1)PC0 (TO1)PC1
10-BIT 12CH A/D CONVERTER XWA XBC XDE SERIAL I/O Channel 0 SERIAL I/O Channel 1
CAN CONTROLLER
W B D H IX IY IZ SP 32 bits SR P C
A C E L
Regulator
REGEN REGOUT X1 X2 CLK XT1 XT2
RESET
XHL XIX XIY XIZ XSP
OSC RTC
F
INTERRUPT CONTROLLER
AM0 AM1 TEST0 TEST1 NMI INT0 P00toP07 (D0toD7) P40toP47 (A0toA7) P70( RD ) P71( WR ) P73( CS ) P74 P75( WAIT ) PN0(SCK0) PN1(SO0/SDA0) PN2(SI0/SCL0) PN3(SCK1/A12) PN4(SO1/SDA1/A13) PN5(SI1/SCL1/A14) PM4(SCK2) PN6(SO2/SDA2/A15) P72(SI2/SCL2)
8BIT TIMER (TIMER0) 8BIT TIMER (TIMER1) 8BIT TIMER (TIMER2)
WATCH-DOG TIMER REAL TIME CLOCK (RTC)
PORT0 PORT4
32KB RAM
PORT7
(TO3/INT2)PC2 (TI4/INT3)PC3
8BIT TIMER (TIMER3) 8BIT TIMER (TIMER4) 8BIT TIMER (TIMER5) 8BIT TIMER (TIMER6) 8BIT TIMER (TIMER7) 16BIT TIMER (TIMER8) 16BIT TIMER (TIMERA) Figure 1 TMP92CD54I block diagram SERIAL EXP.I/F 512KB Mask ROM SERIAL BUS I/F Channel 0 SERIAL BUS I/F Channel 1 SERIAL BUS I/F Channel 2
(TO5)PC4
(TO7/INT4)PC5
(TI8/WUINT0/INT5/A16)PD0 (TI9/WUINT1/INT6/A17)PD1 (TO8/WUINT2/A18)PD2 (TO9/WUINT3/A19)PD3 (TIA/WUINT4/INT7/A20)PD4 (TIB/WUINT5/A21)PD5 (TOA/WUINT6/A22)PD6 (TOB/WUINT7/A23)PD7
PM0( SS /A8) PM1(MOSI/A9) PM2(MISO/A10) PM3(SECLK/A11)
92CD54I-4
2006-01-27
CONNECT
900/H1 CPU
DVSS[6] DVCC5[5] DVCC3[3]
TMP92CD54I
2. Pin Assignment and Functions
2.1 Pin Assignment
095
090
085
080
ADVSS ADVCC VREFL VREFH RX/PF7 TX/PF6 CTS1/SCLK1/PF5 RXD1/PF4 TXD1/PF3 CTS0/SCLK0/PF2 RXD0/PF1 TXD0/PF0 DVSS PM4/SCK2 DVCC5 A8/SS/PM0 A9/MOSI/PM1 A10/MISO/PM2 A11/SECLK/PM3 D0/P00 D1/P01 D2/P02 D3/P03 D4/P04 D5/P05
01
076
100
PL3/AN11 PL2/AN10 PL1/AN9 PL0/AN8 PG7/AN7 PG6/AN6 PG5/AN5 PG4/AN4 PG3/AN3 PG2/AN2 PG1/AN1 PG0/AN0 DVSS P75/WAIT DVCC3 P74 P73/CS P72/SI2/SCL2 P71/WR P70/RD AM0 RESET AM1 CLK TEST0
75
05
70
10
TMP92CD54IF
(P-LQFP100-1414-0.50F)
65
14 x 14 x 1.4
15
TOP VIEW
60
20
55
26
30
35
40
45
D6/P06 D7/P07 A0/P40 A1/P41 A2/P42 A3/P43 A4/P44 A5/P45 A6/P46 A7/P47 DVCC3 INT0 DVSS NMI DVCC5 A16/WUINT0/INT5/TI8/PD0 A17/WUINT1/INT6/TI9/PD1 A18/WUINT2/TO8/PD2 A19/WUINT3/TO9/PD3 A20/WUINT4/INT7/TIA/PD4 A21/WUINT5/TIB/PD5 A22/WUINT6/TOA/PD6 A23/WUINT7/TOB/PD7 REGOUT DVCC5
Figure 2.1 TMP92CD54I Pin Assignment
92CD54I-5
50
25
51
DVCC5 X1 DVSS X2 TEST1 XT1 XT2 DVCC3 PN6/SO2/SDA2/A15 PN5/SI1/SCL1/A14 PN4/SO1/SDA1/A13 PN3/SCK1/A12 DVSS PN2/SI0/SCL0 DVCC5 PN1/SO0/SDA0 PN0/SCK0 PC0/TI0/INT1 PC1/TO1 PC2/TO3/INT2 PC3/TI4/INT3 PC4/TO5 PC5/TO7/INT4 REGEN DVSS
2006-01-27
TMP92CD54I
2.2 Pin names and functions
The following table shows the names and functions of the input/output pins.
Pin Number of In/Out Function number pins P00..P07 (CMOS) in/out Port 0: I/O port. Input or output specifiable in units of bits. 20th...27th 8 D0..D7 (TTL) in/out Data: Data bus 0 to 7. in/out Port4: I/O port. Input or output specifiable in units of bits. P40..P47 8 28th...35th out Address: Address bus 0 to 7. A0..A7 in/out Port70: I/O port. P70 81st 1 out Read: Outputs strobe signal to read external memory. RD Pin name
P71 WR P72 SI2 SCL2 P73 CS P74 P75 WAIT PC0 TI0 INT1 PC1 TO1 PC2 TO3 INT2 PC3 TI4 INT3 PC4 TO5 PC5 TO7 INT4 PD0 TI8 INT5 A16 WUINT0 PD1 TI9 INT6 A17 WUINT1 PD2 TO8 A18 WUINT2 PD3 TO9 A19 WUINT3
82nd 83rd 84th 85th 87th 58th 57th 56th 55th 54th 53rd
1 1 1 1 1 1 1 1 1 1 1
in/out Port 71: I/O port. out Write: Output strobe signal to write external memory. Port 72: I/O port. in/out SBI channel 2: Input data at SIO mode SBI channel 2: Clock input/output at IC mode in/out Port 73: I/O port. out Chip select: Outputs "low" if address is within specified address area. in/out Port 74: I/O port. in/out Port 75: I/O port. in Wait: Signal used to request CPU bus wait. Port C0: I/O port. Timer input 0: Input pin for timer 0. INT1 Interrupt request pin 1: Rising-edge interrupt request pin. Port C1: I/O port. Timer output 1: Output pin for timer 1. Port C2: I/O port. Timer output 3: Output pin for timer 3. INT2 Interrupt request pin 2: Rising-edge interrupt request pin. Port C3: I/O port. INT3 Timer input 4: Input pin for timer 4. Interrupt request pin 3: Rising-edge interrupt request pin. Port C4: I/O port. Timer output 5: Output pin for timer 5. Port C5: I/O port. INT4 Timer output 7: Output pin for timer 7. Interrupt request pin 4: Rising-edge interrupt request pin. Port D0: I/O port. INT5 Timer input 8: Input pin for timer 8. Interrupt request pin 5: Interrupt request pin with programmable rising/falling WUINT0 edge. out Address: Address bus 16. Wake up input 0: Wake up request pin with programmable rising, falling or both in falling and rising edge. in/out Port D1: I/O port. WUINT1 INT6 in Timer input 9: Input pin for timer 9. in Interrupt request pin 6: Rising-edge interrupt request pin. out Address: Address bus 17. in Wake up input 1: Wake up request pin with programmable rising, falling or both falling and rising edge. in/out Port D2: I/O port. out Timer output 8: Output pin for timer 8 WUINT2 out Address: Address bus 18. in Wake up input 2: Wake up request pin with programmable rising, falling or both falling and rising edge. in/out Port D3: I/O port. out Timer output 9: Output pin for timer 9 WUINT3 out Address: Address bus 19. in Wake up input 3: Wake up request pin with programmable rising, falling or both falling and rising edge. in/out in in in/out out in/out out in in/out in in in/out out in/out out in in/out in in
41st
1
42nd
1
43rd
1
44th
1
92CD54I-6
2006-01-27
TMP92CD54I
Pin name PD4 TIA INT7 A20 WUINT4 PD5 TIB A21 WUINT5 PD6 TOA A22 WUINT6 PD7 TOB A23 WUINT7 PF0 TXD0 PF1 RXD0 PF2 SCLK0 CTS0 PF3 TXD1 PF4 RXD1 PF5 SCLK1 Pin number Number of pins In/Out Function
45th
1
46th
1
47th
1
48th
1
12th 11th 10th 9th 8th 7th
1 1 1 1 1 1 1 1 8 4
in/out Port D4: I/O port. INT7 Timer input A: Input pin for timer A in Interrupt request pin 7: Interrupt request pin with programmable rising/falling in edge. WUINT4 out Address: Address bus 20. Wake up input 4: Wake up request pin with programmable rising, falling or both in falling and rising edge. in/out Port D5: I/O port. WUINT5 Timer input B: Input pin for timer B. in out Address: Address bus 21. Wake up input 5: Wake up request pin with programmable rising, falling or both in falling and rising edge. in/out Port D6: I/O port. WUINT6 out Timer output A: Output pin for timer A. out Address: Address bus 22. in Wake up input 6: Wake up request pin with programmable rising, falling or both falling and rising edge. in/out Port D7: I/O port. WUINT7 out Timer output B: Output pin for timer B. out Address: Address bus 23. in Wake up input 7: Wake up request pin with programmable rising, falling or both falling and rising edge. in/out Port F0: I/O port. out Serial interface channel 0: Transmission data. in/out Port F1: I/O port. in Serial interface channel 0: Receive data. in/out Port F2: I/O port. in/out Serial interface channel 0: Clock input/output. in Serial interface channel 0: Data ready to send. (Clear-to-send) in/out out in/out in in/out in/out in in/out out in/out in in in in in Port F3: I/O port. Serial interface channel 1: Transmission data. Port F4: I/O port. Serial interface channel 1: Receive data. Port F5: I/O port. Serial interface channel 1: Clock input/output. Serial interface channel 1: Data ready to send. (Clear-to-send) Port F6: I/O port. CAN: Transmission data. Port F7: I/O port. CAN: Receive data. Port G: Input-only port. Analog input 0 to 7: AD converter input pins. Port L0 to L3: Input-only port. Analog input 8 to 11: AD converter input pins.
CTS1 PF6 6th TX PF7 5th RX PG0..PG7 89th...96th AN0..AN7 PL0..PL3 AN8..AN1 97th...100th 1 PM0 16th SS A8 PM1 MOSI 17th A9 PM2 MISO 18th A10 PM3 SECLK 19th A11 PM4 14th SCK2 PN0 59th SCK0
1
in/out Port M0: I/O port. in SEI: Slave select input. out Address: Address bus 8. in/out in/out out in/out in/out out in/out in/out out in/out in/out in/out in/out Port M1: I/O port. SEI: Master output, slave input. Address: Address bus 9. Port M2: I/O port. SEI: Master input, slave output. Address: Address bus 10. Port M3: I/O port. SEI: Clock input/output. Address: Address bus 11. Port M4: I/O port. SBI channel 2: Clock input/output at SIO mode. Port N0: I/O port. SBI channel 0: Clock input/output at SIO mode.
1 1 1 1 1
92CD54I-7
2006-01-27
TMP92CD54I
Pin name PN1 SO0 SDA0 PN2 SI0 SCL0 PN3 SCK1 A12 PN4 SO1 SDA1 A13 PN5 SI1 SCL1 A14 PN6 SO2 SDA2 A15
NMI INT0 AM0,1 TEST0,1 CLK X1/X2 XT1/XT2 RESET VREFH VREFL ADVCC ADVSS DVCC5 DVCC3 DVSS REGOUT REGEN
Pin number 60th 62nd 64th
Number of pins 1 1 1
In/Out in/out out in/out in/out in in/out in/out in/out out in/out out in/out out in/out in in/out out
Function
65th
1
66th
1
67th
1
39th
1
Port N1: I/O port. SBI channel 0: Output data input/output at SIO mode SBI channel 0: Data input/output at IC mode Port N2: I/O port. SBI channel 0: Input data at SIO mode SBI channel 0: Clock input/output at IC mode Port N3: I/O port. SBI channel 1: Clock input/output at SIO mode Address: Address bus 12. Port N4: I/O port. SBI channel 1: Output data at SIO mode SBI channel 1: Data input/output at IC mode Address: Address bus 13. Port N5: I/O port. SBI channel 1: Input data at SIO mode SBI channel 1: Clock input/output at IC mode Address: Address bus 14 Port N6: I/O port. in/out SBI channel 2: Output data at SIO mode out SBI channel 2: data input output at I2C mode Address: Address bus 15. Non-maskable interrupt: Interrupt request pin with programmable falling or both in falling and rising edge. NMI
in in in out Interrupt request pin 0: Interrupt request pin with programmable level or rising-edge. INT0 Address Mode selection: Connect AM0 pin to L, AM1 pins to H. Test mode pins: Should be set to L. Programmable clock output (with pull-up register) Low frequency oscillator connecting pins. Crystal or ceramic resonator is connected. RC oscillation is also possible Reset: Initializes LSI (with pull-up register). AD reference voltage high AD reference voltage low Power supply pin for AD converter (+5V): Connect ADVCC pin to 5V power supply. GND pin for AD converter: Connect ADVSS pin to GND (0V). Power supply pins (+5V): Connect all DVCC5 pins to 5V power supply. Power supply pins (+3.3V): Connect all DVCC3 pins to REGOUT pin. GND: Connect all DVSS pins to GND (0V). Regulator output 3.3V: Connect capacitor to stabilize the regulator output. Regulator enable pin: Should be set to H or OPEN (with pull-up register).
37th 80th, 78th 76th, 71st 77th 74th, 72nd 70th, 69th 79th 4th 3rd 2nd 1st 15th, 40th, 50th,61st,75th 36th,68th,86th 13th,38th,51st, 63rd,73rd,88th 49th 52nd
1 2 2 1 2 2 1 1 1 1 1 5 3 6 1 1
in/out Oscillator connecting pins in/out in in in out in
92CD54I-8
2006-01-27
TMP92CD54I
3.
OPERATION
This section describes the basic components, functions and operation of TMP92CD54I.
3.1 CPU
TMP92CD54I contains an advanced high-speed 32-bit CPU (900/H1 CPU)
3.1.1
CPU Outline
900/H1 CPU is high-speed and high-performance CPU based on 900/H CPU. 900/H1 CPU has expanded 32-bit internal data bus to process Instructions more quickly. Outline of 900/H1 CPU are as follows: 900/H1 CPU 24-bit 32-bit 16 to 20MHz (@fOSC=8 to 10MHz) 1-clock access (50ns@fOSC=10MHz) 32-bit 1-clock access 32-bit interleave 2-1-1-1-clock access 8/16-bit 2-clock access PORT, INTC, MEMC 8/16-bit 5 to 6-clock access SEI, SIO, WDT, 8-bit Timer, 16-bit Timer, RTC, 10-bit ADC, SBI, CAN 8-bit 2-clock access (can insert some waits) 1-clock(50ns@fOSC=10MHz) 2-clock(100ns@fOSC=10MHz) 12-byte Compatible with TLCS-900, 900/H, 900/L, 900/L1 and 900/H2 (NORMAL, MIN, MAX and LDX instruction is deleted) 8-channels
Width of CPU Address Bus Width of CPU Data Bus Internal Operating Frequency Minimum Bus Cycle (Internal RAM) Internal RAM
Internal ROM
Internal I/O
External Device Minimum Instruction Execution Cycle Conditional Jump Instruction Queue Buffer Instruction Set Micro DMA
92CD54I-9
2006-01-27
TMP92CD54I 3.1.2 Reset Operation
When resetting TMP92CD54I microcontroller, ensure that the power supply voltage is within the operating voltage range, and that the internal high-frequency oscillator has stabilized. Then hold the RESET input Low for at least 20 system clocks (4us). At reset the clock doubler is bypassed and system clock operates at 5MHz (fOSC=10MHz). When the Reset has been accepted, the CPU performs the following: * Sets the Program Counter (PC) as follows in accordance with the Reset Vector stored at address FFFF00H to FFFF02H: PC<0 to 7> data in location FFFF00H PC<8 to 15> data in location FFFF01H PC<16 to 23> data in location FFFF02H * Sets the Stack Pointer (XSP) to 00000000H. * Sets bits of the Status Register (SR) to 111 (thereby setting the Interrupt Level Mask Register to level 7). * Clears bits of the Status Register to 00 (thereby selecting Register Bank 0). When the Reset is released, the CPU starts executing instructions according to the Program Counter settings. CPU internal registers not mentioned above do not change when the Reset is released. When the Reset is accepted, the CPU sets internal I/O, ports and other pins as follows. * Initializes the internal I/O registers as table of "Special Function Register" in Section 5. * Sets the port pins, including the pins that also act as internal I/O, to General-Purpose Input or Output Port Mode. When external reset is released, built-in clock doubler begins operation and after the stable time (1.6384ms @ fOSC=10MHz) elapse of the circuit, internal reset is released. The operation of memory controller cannot be insured until power supply becomes stable after power-on reset. The external RAM data provided before turning on TMP92CD54I may be spoiled because the control signals are unstable until power supply becomes stable after power on reset. TMP92CD54I can initialize all general-purpose ports and CLKOUT setting by reset, even if the device is not fed DVCC3 voltage to. When RESET = L level, CLKOUT will be initialized to High-z, but CLKOUT is pulled-up in internal logic. If the device is not fed DVCC3 voltage to, RESET = L level, CLKOUT will be High-z or pulled-up (H level output).
3.1.3
Setting of TEST0, TEST1, AM0 and AM1
Connect TEST0, TEST1 pin to "GND" to use at NORMAL mode. Set AM0 pin to "0" and set AM1 pin to "1" to use. Table 3.1.2 Operation Mode Setup Table
Operation Mode Single-chip Mode RESET Mode Setup input pin AM1 AM0 TEST1 1 0 0 TEST0 0
92CD54I-10
2006-01-27
TMP92CD54I
3.2 Memory Map
Figure 3.2 is a memory map of TMP92CD54I.
000000H Direct area (n) 000100H 000400H Internal RAM (32 KByte) 008400H Internal I/O (1 KByte) 64Kbyte area (nn)
010000H
External memory
Emulator Control Area (64K Byte)
(Note1)
F80000H
512 KByte Internal ROM
16Mbyte area (R) (-R) (R+) (R + R8/16) (R + d8/16) (nnn)
FFFF00H FFFFFFH
Vector table (256 Byte) (
(Note2)
= Internal area)
Figure 3.2 Memory Map
Note1: The emulator control area is for emulator, it is mapped F00000H to F10000H address after reset. Note2: Don't use the last 16-byte area (FFFFF0H to FFFFFFH). This area is reserved. Note3: On emulator WR signal and RD signal are asserted, when emulator control area is accessed. Be careful to use external memory. Note4: Since there is a possibility of abnormal writing/reading of the data if Bus width put the different memories in consecutive address, do not execute an access which is placed on both memories with one command.
92CD54I-11
2006-01-27
TMP92CD54I
3.3 The Clock Function and Standby Function
3.3.1
10MHz X1 X2 High Frequency OSC
Block diagram of system clock
(10MHz)
(40MHz)
To generate the external memory interface timing
Clock doubler*1 (PLL)x4
System Clock `fc'
1/2
20MHz
CPU MEMC INTC ROMC PORT CAN SIO TIMER WDT SBI A/D RTC
SEI
1/2 10MHz
2/5
16MHz
(32.768 kHz) XT1 XT2
(32.768 kHz) For RTC 14-stage binary counter
Low frequency OSC
fs
*1) Clock-doubler outputs averaging 40MHz clock because it is corrected in clock unit of High Frequency OSC output (10MHz) though it has the possibility that the tolerance of 1.46ns at 40MHz (reference data) is included.
Figure 3.3.1 Block Diagram of System clock
92CD54I-12
2006-01-27
TMP92CD54I 3.3.2 Standby controller
(1) Halt Modes When the HALT instruction is executed, the operating mode switches to Idle2, Idle1, Idle3 or Stop Mode, depending on the contents of the CLKMOD register. Clock Mode Register 7
CLKMOD (010AH) bit Symbol Read/Write After reset 1 Standby mode 00: IDLE3 01: STOP 10: IDLE1 11: IDLE2 HALTM1 R/W 1 -
6
HALTM0
5
-
4
R/W 0 Fix to "0"
3
-
2
CLKOE 0 CLKoutput enable 0: not output 1: output
1
CLKM1 R/W 0
0
CLKM0 0
Function
CLK output select 00: fc 01: Reserved 10: 2/5 fc 11: Reserved
CLK output clock select 00 01 10 11 fc Reserved 2/5 fc Reserved
CLK output enable 0 1 Not output (Pull up) Output
Selects standby mode by HALT instruction 00 01 10 11 IDLE3 STOP IDLE1 IDLE2
Figure 3.3.2 Clock Mode Register
92CD54I-13
2006-01-27
TMP92CD54I
The subsequent actions performed in each mode are as follows: Idle2: The CPU only is halted. In Idle2 Mode internal I/O operations can be performed by setting the following registers. Table 3.3.1 Shows the registers of setting operation during Idle2 Mode. Table 3.3.1 Shows the registers of setting operation during Idle2 Mode Internal I/O SFR
TIMER0,TIMER1 TIMER2,TIMER3 TIMER4,TIMER5 TIMER6,TIMER7 TIMER8 TIMERA SIO0 SIO1 SBI0 SBI1 SBI2 A/D converter WDT TRUN01 TRUN23 TRUN45 TRUN67 TRUN8 TRUNA SC0MOD1 SC1MOD1 SBI0BR0 SBI1BR0 SBI2BR0 ADMOD1 WDMOD
Idle1: Only the oscillator of low and high frequency continue to operate. Idle3: Only the oscillator of low frequency and RTC are operated. Stop: All internal circuits stop operating. The operation of each of the different Halt Modes is described in Table 3.3.2.
Halt Mode
CLKMOD CPU I/O ports 8-bit TMR, 16-bit TMR SIO, SBI A/D converter WDT RTC, XT1 CAN, SEI Interrupt controller
Table 3.3.2 I/O operation during Halt Modes Idle2 Idle1 Idle3
11 10 00
Stop
01 See table 3.3.5
Halt
Maintain same state as when HALT instruction was executed.
Block
Selectable
See table 3.3.1
Stopped
Operational
92CD54I-14
2006-01-27
TMP92CD54I
(2) How to clear a Halt mode The Halt state can be cleared by a Reset or by an interrupt request. The combination of the value in of the Interrupt Mask Register and the current Halt mode determine in which ways the Halt mode may be cleared. The details associated with each type of Halt state clearance are shown in Table 3.3.5. * Clearance by interrupt request Whether or not the Halt mode is cleared and subsequent operation depends on the status of the generated interrupt. If the interrupt request level set before execution of the HALT instruction is greater than or equal to the value in the Interrupt Mask Register, the following sequence takes place: the Halt mode is cleared, the interrupt is then processed, and the CPU then resumes execution starting from the instruction following the HALT instruction. If the interrupt request level set before execution of the HALT instruction is less than the value in the Interrupt Mask Register, the Halt mode is not cleared. (If a non-maskable interrupt is generated, the Halt mode is cleared and the interrupt processed, regardless of the value in the Interrupt Mask Register.) However, for INT0 only, even if the interrupt request level set before execution of the HALT instruction is less than the value in the Interrupt Mask Register, the Halt mode is cleared. In this case, the interrupt is not processed and the CPU resumes execution starting from the instruction following the HALT instruction. The interrupt request flag remains set to 1. * Clearance by Reset Any Halt state can be cleared by Reset. When Stop Mode is cleared by RESET signal, sufficient time (at least10ms@fOSCMHz) must be allowed after the Reset for the operation of the oscillator and clock doubler to stabilize. When a Halt mode is cleared by resetting, the contents of the internal RAM remain the same as they were before execution of the HALT instruction. However, all other settings are re-initialized. (Clearance by an interrupt affects neither the RAM contents nor any other settings - the state which existed before the HALT instruction was executed is retained.)
92CD54I-15
2006-01-27
TMP92CD54I
Table 3.3.3 Source of Halt state clearance and Halt clearance operation Status of Received Interrupt Halt mode
NMI INTWDT INT0
Interrupt Enabled Interrupt Disabled (interrupt level) (interrupt mask) (interrupt level) < (interrupt mask) Idle2 Idle1
x
Idle3
*1
Stop
*1
Idle2
- -
Idle1
- -
Idle3
- -
*1 *2 *1 *2
Stop
- -
*1 *2 *1 *2
x
*1 *2 *1 *2
x
*1 *2 *1 *2
Source of Halt state clearance
INT0 [MASK] INT1 to 7 INTT0 to 7 INTTR8 to B INTTO8, INTTOA INTRX0 to 1, TX0 to 1 INTCR0, INTCT0, INTCG0 INTSEM0, E0, R0, T0 INTSBE0, S0, E1, S1, E2, S2 INTAD
All the above-mentioned interrupts [MASK]
x x x x x x x x x x x
x x x x x x x x x x
*1 *1
x x x x x x x x x x x x
x x x x x x x x x x
x x x x x x x x x x
x x x x x x x x x x
*1 *1
x x x x x x x x x x x x
Interrupt
INTRTC INTRTC [MASK] RESET
: After clearing the Halt mode, CPU starts interrupt processing. (RESET initializes the microcont.) : After clearing the Halt mode, CPU resumes executing starting from instruction following the HALT instruction. x: Cannot be used to clear the Halt mode. -: The priority level (interrupt request level) of non-maskable interrupts is fixed to 7, the highest priority level. There is not this combination type. *1: The Halt mode is cleared when the warm-up time has elapsed. *2: Any WUINT interrupt (WUINT0 to WUINT7) generate an INT0 interrupt. Note 1: When the Halt mode is cleared by an INT0 interrupt of the level mode in the interrupt enabled status, hold level H until starting interrupt processing. If level L is set before holding level H, interrupt processing is not correctly started. Note 2: When the external interrupts INT5 to INT7 are used during Idle2 Mode, set to 1 for TRUN8 and TRUNA. (Example - clearing Idle1 Mode) An INT0 interrupt clears the Halt state when the device is in Idle1 Mode.
Address 8203H 8206H 8209H 820BH 820EH INT0 LD LD EI LD HALT (IIMC), 00H (INTE0AD), 06H 5 (CLKMOD), 80H ; Selects INT0 interrupt rising edge. ; Sets INT0 interrupt level to 6. ; Sets interrupt level to 5 for CPU. ; Sets Halt mode to Idle1 Mode. ; Halts CPU. INT0 interrupt routine RETI 820FH LD XX, XX
92CD54I-16
2006-01-27
TMP92CD54I
(3) Operation Idle2 Mode In Idle2 Mode only specific internal I/O operations, as designated by the Idle2 Setting Register, can take place. Instruction execution by the CPU stops. Figure 3.3.3 illustrates an example of the timing for clearance of the Idle2 Mode Halt state by an interrupt.
fc A0 to 23 Internal signals Next Next+4
D0 to 31
Data
Data
RD WR
Clearing interrupt HALT instruction execution sequence Interrupt response sequence
Figure 3.3.3 Timing chart for Idle2 Mode Halt state cleared by interrupt Idle1 Mode In Idle1 Mode, only the internal oscillator continue to operate. The system clock in the MCU stops. In the Halt state, the interrupt request is sampled asynchronously with the system clock; however, clearance of the Halt state (i.e. restart of operation) is synchronous with it. Figure 3.3.4 illustrates the timing for clearance of the Idle1 Mode Halt state by an interrupt.
fc A0 to 23 Internal signals Next Next+4
D0 to 31
Data
Data
RD WR
Clearing interrupt HALT instruction execution sequence Interrupt response sequence
Figure 3.3.4 Timing chart for Idle1 Mode Halt state cleared by interrupt
92CD54I-17
2006-01-27
TMP92CD54I
Idle3 Mode
When Idle3 Mode is selected, internal circuits stop including the internal oscillator, except the oscillator of low frequency and RTC. Pin status in Stop Mode depends on the settings in the WDMOD register. Table 3.3.5 summarizes the state of these pins in Stop Mode and Idle3 mode. After Idle3 Mode has been cleared system clock output starts when the warm-up time and clock doubler stable time have elapsed, in order to allow oscillation and clock doubler to stabilize. Figure 3.3.5 illustrates the timing for clearance of the Idle3 Mode Halt state by an interrupt. Idle3 mode can only be released by an NMI pin, INT0 pin or WUINT0 to WUINT7 pins (generate a INT0 interrupt) interrupt, or by reset. When Idle3 mode is released by other than reset, the system clock starts its output after the time set by the warm-up counter for the internal oscillation to stabilize. When using reset to release stop mode, input reset signals long enough for stable oscillation and clock doubler stable time. In systems with an external oscillator, the warm-up counter also operates when Idle3 mode is released. Therefore, such systems also require a warm-up time between input of release signals and system clock output.
(Note)
fc fs(32kHz) Internal signals RTC A0 to 23 D0 to 31 Operated Programmable Next
Data
Operated Programmable Next+4
Data
RD WR
Clearing interrupt HALT instruction execution sequence Interrupt response sequence
(Note); The interrupt processing starts after it completes for Startup time (Tsta) of Oscillator, Warm-up time and clock doubler stable time period, after releasing HALT (Tsta + 1.6 ms + 1.6 ms). Please inquire about Startup time (Tsta) to each oscillator manufacturer.
Figure 3.3.5 Timing chart for Idle3 Mode Halt state cleared by interrupt
92CD54I-18
2006-01-27
TMP92CD54I
Stop Mode When Stop Mode is selected, all internal circuits stop, including the internal oscillator. Pin status in Stop Mode depends on the settings in the WDMOD register. Table 3.3.5 summarizes the state of these pins in Stop Mode and Idle3 mode. After Stop Mode has been cleared system clock output starts when the warm-up time and clock doubler stable time have elapsed, in order to allow oscillation and clock doubler to stabilize. Figure 3.3.6 illustrates the timing for clearance of the Stop Mode Halt state by an interrupt. STOP mode can only be released by an NMI pin, INT0 pin or WUINT0 to WUINT7 pins(generate a INT0 interrupt) interrupt , or by reset. When STOP mode is released by other than reset, the system clock starts its output after the time set by the warm-up counter for the internal oscillation to stabilize. When using reset to release stop mode, input reset signals long enough for stable oscillation and clock doubler stable time. In systems with an external oscillator, the warm-up counter also operates when STOP mode is released. Therefore, such systems also require a warm-up time between input of release signals and system clock output. And if it released from STOP mode, RTCFC register will be initialized without a RESET input. Therefore, it is necessary to set up RTCFC register again after releasing from STOP mode.
(Note)
fc A0 to 23 Internal signals Next Next+4
D0 to 31
Data
Data
RD WR
Clearing interrupt HALT instruction execution sequence Interrupt response sequence
(Note); The interrupt processing starts after it completes for Startup time (Tsta) of Oscillator, Warm-up time and clock doubler stable time period, after releasing HALT (Tsta + 1.6 ms + 1.6 ms). Please inquire about Startup time (Tsta) to each oscillator manufacturer. Figure 3.3.6 Timing chart for Stop Mode Halt state cleared by interrupt
Table 3.3.4 Warming-up time and clock doubler stable time after clearance of Stop Mode and Idle3 Mode (@ fc=20MHz)
Warm-up time Clock doubler stable time 1.6 ms (2 /fOSC) 14 1.6 ms (2 /fOSC) fc = 2xfOSC
14
92CD54I-19
2006-01-27
TMP92CD54I
Table 3.3.5 Pin states in Idle3 and Stop Mode Pin Names
P00 to 07
I/O
Input Mode Output Mode D0 to D7
= 0
Invalid Output High-z Invalid High-z Invalid
High-z Input Input Invalid High-z Input High-z Input Invalid High-z Invalid Invalid Invalid High-z Invalid High-z Input Input Input Input Input Invalid
= 1
P40 to 47/A0 to 7 P70,P71,P73 to 75/
RD , WR , CS to WAIT
P72/SI2/SCL2 PC0 to PC5/TI0 to TO7 PD0 to PD7/TI8 to TOB
Input Mode Output Mode Input Mode
Output Mode Input Mode Output Mode Input Mode Output Mode Input Mode Output Mode WUINT0 to 7
Output
Output Output Output Output
PF0 to PF7/TXD0 to RX PG0 to PG7/AN0 to AN7 PL0 to PL3/AN8 to AN11 PM0 to PM4 / SS to SCK2 PN0 to PN6 /SCK0 to SO2&SDA2 NMI INT0
Input Mode Output Mode Input Mode Input Mode Input Mode Output Mode Input Mode Output Mode Input Input Input Input Input Input Output Input Output Output
Output
Output Output
RESET
AM0, AM1 TEST0, TEST1 X1 X2 XT1 XT2 CLK
H Level Output Invalid (STOP) Operate (IDLE3, RTCFC=1) H Level Output (STOP) Operate (IDLE3, RTCFC=1) H level output (CLKMOD=0) L level output (CLKMOD=00) H or L level Output (CLKMOD=10)
Input: Input gate in operation. Input voltage should be fixed to "L" or "H" so that input pin stays constant. Output: Output state Invalid: Input pin invalid. High-z: Output pin High-Impedance. Note) At RTCFC=1.
92CD54I-20
2006-01-27
TMP92CD54I
3.4 Interrupts
Interrupts are controlled by the CPU Interrupt Mask Register (bits 12 to 14 of the Status Register) and by the built-in interrupt controller. TMP92CD54I has a total of 60 interrupts divided into the following five types: Interrupts generated by CPU: 9 sources * Software interrupts: 8 sources * Illegal Instruction interrupt: 1 source Internal interrupts: 42 sources * Internal I/O interrupts: 34 sources * Micro DMA Transfer End interrupts: 8 sources External interrupts: 9 sources * Interrupts on external pins ( NMI , INT0 to INT7)
A fixed individual interrupt vector number is assigned to each interrupt source. Any one of six levels of priority can also be assigned to each maskable interrupt. Non-maskable interrupts have a fixed priority level of 7, the highest level. When an interrupt is generated, the interrupt controller sends the priority of that interrupt to the CPU. When more than one interrupt are generated simultaneously, the interrupt controller sends the priority value of the interrupt with the highest priority to the CPU. (The highest priority level is 7, the level used for non-maskable interrupts.) The CPU compares the interrupt priority level which it receives with the value held in the CPU Interrupt Mask Register . If the priority level of the interrupt is greater than or equal to the value in the Interrupt Mask Register, the CPU accepts the interrupt. However, software interrupts and Illegal Instruction interrupts generated by the CPU are processed irrespective of the value in . The value in the Interrupt Mask Register can be changed using the EI instruction (EI num sets to num). For example, the command EI 3 enables the acceptance of all non-maskable interrupts and of maskable interrupts whose priority level, as set in the interrupt controller, is 3 or higher. The commands EI and EI 0 enable the acceptance of all non-maskable interrupts and of maskable interrupts with a priority level of 1 or above (hence both are equivalent to the command EI 1). The DI instruction (sets to 7) is exactly equivalent to the EI 7 instruction. The DI instruction is used to disable all maskable interrupts (since the priority level for maskable interrupts ranges from 0 to 6). The EI instruction takes effect as soon as it is executed. In addition to the general-purpose Interrupt Processing Mode described above, there is also a Micro DMA Processing Mode. In Micro DMA Mode the CPU automatically transfers data in one-byte, two-byte or four-byte blocks; this mode allows high-speed data transfer to and from internal and external memory and internal I/O ports. In addition, TMP92CD54I also has a software start function in which micro DMA processing is requested in software rather than by an interrupt. Figure 3.4.1 is a flowchart showing overall interrupt processing.
92CD54I-21
2006-01-27
TMP92CD54I
Interrupt processing Micro DMA soft start request *
Interrupt apecified by micro DMA start vector?
Yes
No
* Micro DMA is initiated by a write cycle which writes to the register DMAR.
Clear interrupt request flag
Interrupt vector calue "V" read Interrupt request F/F clear
Data transfer by micro DMA
General-purpose interrupt processing
PUSH PC PUSH SR SR Level of accepted interrupt + 1 INTNEST INTNEST + 1
Count Count1
Micro DMA processing
Count = 0 No
Yes
Clear vector register generating micro DMA transfer end interrupt (INTTC0 to 7)
PC (FFFF00H + V)
Interrupt processing program
RETI instruction POP SR POP PC INTNESTINTNEST - 1
End
Figure 3.4.1 Interrupt and micro DMA processing sequence
92CD54I-22
2006-01-27
TMP92CD54I 3.4.1 General-purpose interrupt processing
When the CPU accepts an interrupt, it usually performs the following sequence of operations. However, in the case of software interrupts and Illegal Instruction interrupts generated by the CPU, the CPU skips steps (a) and (c) and executes only steps (b), (d) and (e). (a) The CPU reads the interrupt vector from the interrupt controller. When more than one interrupt with the same priority level have been generated simultaneously, the interrupt controller generates an interrupt vector in accordance with the default priority and clears the interrupt requests. (The default priority is determined as follows: the smaller the vector value, the higher the priority.) (b) The CPU pushes the Program Counter (PC) and Status Register (SR) onto the top of the stack (pointed to by XSP). (c) The CPU sets the value of the CPU's Interrupt Mask Register to the priority level for the accepted interrupt plus 1. However, if the priority level for the accepted interrupt is 7, the register's value is set to 7. (d) The CPU increments the interrupt nesting counter INTNEST by 1. (e) The CPU jumps to the address given by adding the contents of address FFFF00H + the interrupt vector, then starts the interrupt processing routine. On completion of interrupt processing, the RETI instruction is used to return control to the main routine. RETI restores the contents of the Program Counter and the Status Register from the stack and decrements the Interrupt Nesting counter INTNEST by 1. Non-maskable interrupts cannot be disabled by a user program. Maskable interrupts, however, can be enabled or disabled by a user program. A program can set the priority level for each interrupt source. (A priority level setting of 0 or 7 will disable an interrupt request.) If an interrupt request is received for an interrupt with a priority level equal to or greater than the value set in the CPU Interrupt Mask Register , the CPU will accept the interrupt. The CPU Interrupt Mask Register is then set to the value of the priority level for the accepted interrupt plus 1. If during interrupt processing, an interrupt is generated with a higher priority than the interrupt currently being processed, or if, during the processing of a non-maskable interrupt processing, a non-maskable interrupt request is generated from another source, the CPU will suspend the routine which it is currently executing and accept the new interrupt. When processing of the new interrupt has been completed, the CPU will resume processing of the suspended interrupt. If the CPU receives another interrupt request while performing processing steps (a) to (e), the new interrupt will be sampled immediately after execution of the first instruction of its interrupt processing routine. Specifying DI as the start instruction disables nesting of maskable interrupts. After a reset, initializes the Interrupt Mask Register to 111, disabling all maskable interrupts. Table 3.4.1 shows TMP92CD54I interrupt vectors and micro DMA start vectors. FFFF00H to FFFFEFH (240 bytes) is designated as the interrupt vector area.
92CD54I-23
2006-01-27
TMP92CD54I
Table 3.4.1 TMP92CD54I interrupt vectors and micro DMA start vectors (1/2)
Default Priority 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Maskable Non Maskable Type Interrupt Source and Source of Micro DMA Request Reset or [SWI0] instruction [SWI1] instruction Illegal instruction or [SWI2] instruction [SWI3] instruction [SWI4] instruction [SWI5] instruction [SWI6] instruction [SWI7] instruction NMI: pin input INTWD: Watchdog Timer Micro DMA INT0: INT0 pin input (Note2) INT1: INT1 pin input INT2: INT2 pin input INT3: INT3 pin input INT4: INT4 pin input INT5: INT5 pin input INT6: INT6 pin input INT7: INT7 pin input INTT0: 8-bit timer 0 INTT1: 8-bit timer 1 INTT2: 8-bit timer 2 INTT3: 8-bit timer 3 INTT4: 8-bit timer 4 INTT5: 8-bit timer 5 INTT6: 8-bit timer 6 INTT7: 8-bit timer 7 INTTR8: 16-bit timer 8 INTTR9: 16-bit timer 8 INTTRA: 16-bit timer A INTTRB: 16-bit timer A INTTO8: 16-bit timer 8 (overflow) INTTOA: 16-bit timer A (overflow) INTRX0: Serial receive (Channel 0) INTTX0: Serial transmission (Channel 0) INTRX1: Serial receive (Channel 1) INTTX1: Serial transmission (Channel 1) INTCR: CAN receive INTCT: CAN transmission INTCG: CAN global INTSEM: SEI mode fault error INTSEE: SEI transfer end / slave error INTSER: SEI receive INTSET: SEI transmission INTRTC: Read Time Counter (reserved) INTSBE2: SBI I2CBUS transfer end (Channel 2) INTSBS2: SBI I2CBUS stop condition (Channel 2) INTSBE0: SBI I2CBUS transfer end (Channel 0) INTSBS0: SBI I2CBUS stop condition (Channel 0) INTSBE1: SBI I2CBUS transfer end (Channel 1) Vector Value 0000H 0004H 0008H 000CH 0010H 0014H 0018H 001CH 0020H 0024H 0028H 002CH 0030H 0034H 0038H 003CH 0040H 0044H 0048H 004CH 0050H 0054H 0058H 005CH 0060H 0064H 0068H 006CH 0070H 0074H 0078H 007CH 0080H 0084H 0088H 008CH 0090H 0094H 0098H 009CH 00A0H 00A4H 00A8H 00ACH 00B0H 00B4H 00B8H 00BCH 00C0H 00C4H Address refer to Vector FFFF00H FFFF04H FFFF08H FFFF0CH FFFF10H FFFF14H FFFF18H FFFF1CH FFFF20H FFFF24H FFFF28H FFFF2CH FFFF30H FFFF34H FFFF38H FFFF3CH FFFF40H FFFF44H FFFF48H FFFF4CH FFFF50H FFFF54H FFFF58H FFFF5CH FFFF60H FFFF64H FFFF68H FFFF6CH FFFF70H FFFF74H FFFF78H FFFF7CH FFFF80H FFFF84H FFFF88H FFFF8CH FFFF90H FFFF94H FFFF98H FFFF9CH FFFFA0H FFFFA4H FFFFA8H FFFFACH FFFFB0H FFFFB4H FFFFB8H FFFFBCH FFFFC0H FFFFC4H 0AH 0BH 0CH 0DH 0EH 0FH 10H 11H 12H 13H 14H 15H 16H 17H 18H 19H 1AH 1BH 1CH 1DH 1EH 1FH 20H (Note3) 21H 22H (Note3) 23H 24H (Note3) 25H (Note3) 26H (Note3) 27H (Note3) 28H (Note3) 29H 2AH 2BH 2DH 2EH 2FH 30H 31H Micro DMA Start Vector
92CD54I-24
2006-01-27
TMP92CD54I
Table 3.4.2 TMP92CD54I interrupt vectors and micro DMA start vectors (2/2)
Default Priority 51 52 53 54 55 56 57 58 59 60 to Maskable Type Interrupt Source and Source of Micro DMA Request INTSBS1: SBI I2CBUS stop condition (Channel 1) INTAD: AD conversion end INTTC0: Micro DMA end (Channel 0) INTTC1: Micro DMA end (Channel 1) INTTC2: Micro DMA end (Channel 2) INTTC3: Micro DMA end (Channel 3) INTTC4: Micro DMA end (Channel 4) INTTC5: Micro DMA end (Channel 5) INTTC6: Micro DMA end (Channel 6) INTTC7: Micro DMA end (Channel 7) (reserved) Vector Value 00C8H 00CCH 00D0H 00D4H 00D8H 00DCH 00E0H 00E4H 00E8H 00ECH 00F0H 00FCH Address refer to Vector FFFFC8H FFFFCCH FFFFD0H FFFFD4H FFFFD8H FFFFDCH FFFFE0H FFFFE4H FFFFE8H FFFFECH FFFFF0H FFFFFCH Micro DMA Start Vector 32H 33H 34H 35H 36H 37H 38H 39H 3AH 3BH to -
Note1: Micro DMA default priority If an interrupt request is generated by micro DMA, the interrupt has a higher priority than any other maskable interrupt (irrespective of default channel priority). Note2: When standing-up micro DMA, set at edge detect mode. Note3: Micro DMA processing cannot be applied. Note4: This table mentions only the start address. Then each vector has 4 bytes.
92CD54I-25
2006-01-27
TMP92CD54I 3.4.2 Micro DMA processing
In addition to general-purpose interrupt processing, TMP92CD54I also includes a micro DMA function. Micro DMA processing for interrupt requests set by micro DMA is performed at the highest priority level for maskable interrupts (level 6), regardless of the priority level of the interrupt source. Because the micro DMA function has been implemented with the cooperative operation of CPU, when CPU is a state of stand-by by HALT instruction, the requirement of micro DMA will be ignored (pending). Micro DMA supports 8 channels and can be transferred continuously by specifying the micro DMA burst function in the following. (1) Micro DMA operation When an interrupt request is generated by an interrupt source specified by the Micro DMA Start Vector Register, the micro DMA triggers a micro DMA request to the CPU at interrupt priority level 6 and starts processing the request. The eight micro DMA channels allow micro DMA processing to be set for up to eight types of interrupt at once. When micro DMA is accepted, the interrupt request flip-flop assigned to that channel is cleared. Data in one-byte or two-byte or four-byte blocks, is automatically transferred at once from the transfer source address to the transfer destination address set in the control register, and the transfer counter is decremented by 1. If the value of the counter after it has been decremented is not 0, DMA processing ends with no change in the value of the micro DMA start vector register. If the value of the decremented counter is 0, a Micro DMA Transfer End interrupt (INTTC0 to INTTC7) is sent from the CPU to the interrupt controller. In addition, the micro DMA start vector register is cleared to 0, the next micro DMA operation is disabled and micro DMA processing terminates. If micro DMA requests are set simultaneously for more than one channel, priority is not based on the interrupt priority level but on the channel number: the lower the channel number, the higher the priority (Channel 0 thus has the highest priority and Channel 7 the lowest). If an interrupt request is triggered on the interrupt source in use during the interval between the time at which the micro DMA start vector is cleared and the next setting, general-purpose interrupt processing is performed at the interrupt level set. Therefore, if the interrupt is only being used to initiate micro DMA (and not as a general-purpose interrupt), the interrupt level should first be set to 0 (i.e. interrupt requests should be disabled). If micro DMA and general-purpose interrupts are being used together as described above, the level of the interrupt which is being used to initiate micro DMA processing should first be set to a lower value than all the other interrupt levels. In this case, edge-triggered interrupts are the only kinds of general interrupts which can be accepted. Although the control registers used for setting the transfer source and transfer destination addresses are 32 bits wide, this type of register can only output 24-bit addresses. Accordingly, micro DMA can only access 16M-bytes (the upper eight bits of a 32-bit address are not valid). Three micro DMA transfer modes are supported: one-byte transfers, two-byte (one-word) transfer and four-byte transfer. After a transfer in any mode, the transfer source and transfer destination addresses will either be incremented or decremented, or will remain unchanged. This simplifies the transfer of data from I/O to memory, from memory to I/O, from I/O to I/O, and memory to memory. For details of the various transfer modes, see Section 3.4.2 (4), Detailed description of the Transfer Mode Register.
92CD54I-26
2006-01-27
TMP92CD54I
Since a transfer counter is a 16-bit counter, up to 65536 micro DMA processing operations can be performed per interrupt source (provided that the transfer counter for the source is initially set to 0000H). Micro DMA processing can be initiated by any one of 43 different interrupts - the 42 interrupts shown in the micro DMA start vectors in Table 3.4.1 and a micro DMA soft start. Figure 3.4.2 shows a 2-byte transfer carried out using a micro DMA cycle in Transfer Destination Address INC Mode (micro DMA transfers are the same in every mode except Counter Mode). (The conditions for this cycle are as follows: external 8-bit bus, 0 waits, and even-numbered transfer source and transfer destination addresses).
One state
1 CLK A023
2
3
4
5
src
dst
Figure 3.4.2 Timing for micro DMA cycle
States 1, 2: State 3: State 4: State 5: Instruction fefetch cycle (pretches the next instruction code) Micro DMA read cycle Micro DMA write cycle (The same as in state 1, 2)
(2) Micro DMA operation TMP92CD54I can initiate micro DMA either with an interrupt or by using the micro DMA soft start function, in which micro DMA is initiated by a Write cycle which writes to the register DMAR. Writing 1 to any bit of the register DMAR causes micro DMA to be performed once. On completion of the transfer, the bits of DMAR which support the end channel are automatically cleared to 0. When a burst is specified by the register DMAB, data is transferred continuously from the initiation of micro DMA until the value in the micro DMA transfer counter is 0.
Symbol
NAME DMA Request
Address
109h (no RMW)
7 DREQ7 0
6 DREQ6 0
5 DREQ5 0
4
3
2 DREQ2 0
1 DREQ1 0
0 DREQ0 0
DMAR
DREQ4 DREQ3 R/W 0 0
92CD54I-27
2006-01-27
TMP92CD54I
(3) Transfer control registers The transfer source address and the transfer destination address are set in the following registers. An instruction of the form LDC cr,r can be used to set these registers.
Channel 0 DMAS0 DMAD0 DMAC0 DMAM0 DMA Source address register 0 DMA Destination address register 0 DMA Counter register 0 DMA Mode register 0
Channel 7 DMAS7 DMAD7 DMAC7 DMAM7 8 bits 16 bits 32 bits DMA Source address register 7 DMA Destination address register 7 DMA Counter register 7 DMA Mode register 7
92CD54I-28
2006-01-27
TMP92CD54I
(4) Detailed description of the Transfer Mode Register
0
0
0
Mode
DMAM0 to 7
DMAM[4:0] 000zz
001zz
010zz
011zz
100zz
101zz
110zz
111zz
Mode Description Destination INC mode (DMADn +) (DMASn) DMACn DMACn - 1 if DMACn = 0 then INTTCn Destination DEC mode (DMADn -) (DMASn) DMACn - 1 DMACn if DMACn = 0 then INTTCn Source INC mode (DMADn) (DMASn +) DMACn DMACn - 1 if DMACn = 0 then INTTCn Source DEC mode (DMADn) (DMASn -) DMACn DMACn - 1 if DMACn = 0 then INTTCn Source and Destination INC mode (DMADn +) (DMASn +) DMACn DMACn - 1 If DMACn = 0 then INTTCn Source and Destination DEC mode (DMADn -) (DMASn -) DMACn DMACn - 1 If DMACn = 0 then INTTCn Destination and Fixed mode (DMADn) (DMASn) DMACn DMACn - 1 If DMACn = 0 then INTTCn Counter mode DMASn DMASn + 1 DMACn DMACn - 1 If DMACn = 0 then INTTCn
Execution time 5states
5states
5states
5states
6states
6states
5states
5states
ZZ:
00 = 1-byte transfer 01 = 2-byte transfer 10 = 4-byte transfer 11 = (reserved)
Note1: The execution time is measured at 1states = 50ns (operation @internal 20 MHz) Note2: n stands for the micro DMA channel number (0 to 7) DMADn+/DMASn+: Post-increment (register value is incremented after transfer) DMADn-/DMASn-: Post-decrement (register value is decremented after transfer)
92CD54I-29
2006-01-27
TMP92CD54I 3.4.3 Interrupt controller operation
The block diagram in Figure 3.4.3 shows the interrupt circuits. The left-hand side of the diagram shows the interrupt controller circuit. The right-hand side shows the CPU interrupt request signal circuit and the halt release circuit. For each of the 51 interrupt channels there is an interrupt request flag (consisting of a flip-flop), an interrupt priority setting register and a micro DMA start vector register. The interrupt request flag latches interrupt requests from the peripherals. The flag is cleared to zero in the following cases: when a Reset occurs, when the CPU reads the channel vector of an interrupt it has received, when the CPU receives a micro DMA request (when micro DMA is set), when a micro DMA burst transfer is terminated, and when an instruction that clears the interrupt for that channel is executed (by writting a micro DMA start vector to the INTCLR register). An interrupt priority can be set independently for each interrupt source by writing the priority to the interrupt priority setting register (e.g. INTE0AD or INTE12). Six interrupt priorities levels (1 to 6) are provided. Setting an interrupt source's priority level to 0 (or 7) disables interrupt requests from that source. The priority of non-maskable interrupts (NMI pin interrupts and Watchdog Timer interrupts) is fixed at 7. If more than one interrupt request with a given priority level are generated simultaneously, the default priority (the interrupt with the lowest priority or, in other words, the interrupt with the lowest vector value) is used to determine which interrupt request is accepted first. The 3rd and 7th bits of the interrupt priority setting register indicate the state of the interrupt request flag and thus whether an interrupt request for a given channel has occurred. If several interrupts are generated simultaneously, the interrupt controller sends the interrupt request for the interrupt with the highest priority and the interrupt's vector address to the CPU. The CPU compares the mask value set in of the Status Register (SR) with the priority level of the requested interrupt; if the latter is higher, the interrupt is accepted. Then the CPU sets SR to the priority level of the accepted interrupt + 1. Hence, during processing of the accepted interrupt, new interrupt requests with a priority value equal to or higher than the value set in SR (i.e. interrupts with a priority higher than the interrupt being processed) will be accepted. When interrupt processing has been completed (i.e. after execution of a RETI instruction), the CPU restores to SR the priority value which was saved on the stack before the interrupt was generated. The interrupt controller also includes eight registers which are used to store the micro DMA start vector. Writing the start vector of the interrupt source for the micro DMA processing (see Table 3.4.1), enables the corresponding interrupt to be processed by micro DMA processing. The values must be set in the micro DMA parameter registers (e.g. DMAS and DMAD) prior to micro DMA processing.
92CD54I-30
2006-01-27
Interrupt controller Interrupt request F/F S R
V = 20H V = 24H
CPU 1
NMI
Q Interrupt mask F/F RESET
Interrupt request
RESET interrupt vector read Priority setting register
Dn A Dn + 1
INTWD
Decoder Priority encoder signal to CPU IFF2:0 3 3 1 7 6 6
B C
EI 1 to 7 DI Interrupt level detect Interrupt request signal
D
Dn + 2
Q CLR
Interrupt request F/F Q Interrupt request F/F D1 51
Interrupt vector generator
Y1 Y2 Y3 Y4 Y5 Y6
INT0
Dn + 3
Reset
S R Interrupt vector read Micro DMA acknowledge
V = 28H V = 2CH V = 30H V = 34H V = 38H V = 3CH V = 40H V = 44H V = 48H V = 4CH
1 A 2 3 INTRQ2 to 0 3 Highest B Priority 4 interrupt C 5 level select Interrupt vector V read 6 D0 7
if INTRQ2:0IFF2:0 then 1.
INT1 INT2 INT3 INT4 INT5 INT6 INT7 INTT0 INTT1
D2 D3 D4 D5 D6 D7
During IDLE1 During STOP
Figure 3.4.3 Block Diagram of Interrupt Controller
92CD54I-31
6
V = D0H V = D4H V = D8H V = DCH V = E0H V = E4H V = E8H V = ECH
HALT release
Micro DMA Counter Zero Interrupt
RESET INT0 NMI 8 8 input OR
Micro DMA request
INTTC0 INTTC1 INTTC2 INTTC3 INTTC4 INTTC5 INTTC6 INTTC7
Micro DMA start vector setting register
6
Match Detect
D5 D4 D3 D2 D1 D0
DQ CLR 6 Soft start
INTTC0 DMA0V DMA1V : DMA7V
if 1IFF2:06 then 1.
0 1 2 3 4 5 6 7
RESET
A B C Micro DMA channel priority encoder
3
3
Micro DMA channel specification
TMP92CD54I
2006-01-27
TMP92CD54I
(1) Interrupt priority setting registers
Symbol NAME INT0 & INTAD Enable
Address
7 IADC R 0 I2C R 0 I4C R 0 I6C R 0 -
6
5
4 IADM0 0 I2M0 0 I4M0 0 I6M0 0 IT1M0 0 IT3M0 0 IT5M0 0 IT7M0 0 IT9M0 0 ITBM0 0
ITOAM0
3 I0C R 0 I1C R 0 I3C R 0 I5C R 0 I7C R 0 IT0C R 0 IT2C R 0 IT4C R 0 IT6C R 0 IT8C R 0 ITAC R 0 ITO8C R 0
2 INT0 I0M2 0 INT1 I1M2 0 INT3 I3M2 0 INT5 I5M2 0 INT7 I7M2
1 I0M1 R/W 0 I1M1 R/W 0 I3M1 R/W 0 I5M1 R/W 0
0 (Note) I0M0 0 I1M0 0 I3M0 0 I5M0 0 I7M0 0 IT0M0 0 IT2M0 0 IT4M0 0 IT6M0 0 IT8M0 0 ITAM0 0 ITO8M0 0
INTE0AD
F0h
INTE12
INT1 & INT2 Enable
D0h
INTE34
INT3 & INT4 Enable
D1h
INTE56
INT5 & INT6 Enable
D2h
INTAD IADM2 IADM1 R/W 0 0 INT2 I2M2 I2M1 R/W 0 0 INT4 I4M2 I4M1 R/W 0 0 INT6 I6M2 I6M1 R/W 0 0 -
INTE7
INT7 Enable
D7h
INTET01
INTT0 & INTT1 Enable
D4h
IT1C R 0 IT3C R 0 IT5C R 0 IT7C R 0 IT9C R 0 ITBC R 0 ITOAC R 0
INTET23
INTT2 & INTT3 Enable
D5h
INTET45
INTT4 & INTT5 Enable
D6h
INTET67
INTT6 & INTT7 Enable
D7h
INTET89
INTTR8 & INTTR9 Enable INTTRA & INTTRB Enable
D8h
INTETAB
D9h
INTTO8 & INTTOA INTETO8A (Overflow) Enable
INTT1(Timer1) IT1M2 IT1M1 R/W 0 0 INTT3(Timer3) IT3M2 IT3M1 R/W 0 0 INTT5(Timer5) IT5M2 IT5M1 R/W 0 0 INTT7(Timer7) IT7M2 IT7M1 R/W 0 0 INTTR9(Timer8) IT9M2 IT9M1 R/W 0 0 INTTRB(TimerA) ITBM2 ITBM1 R/W 0 0 INTTOA
ITOAM2 ITOAM1
DAh
0
R/W 0
0
I7M1 R/W 0 0 INTT0(Timer0) IT0M2 IT0M1 R/W 0 0 INTT2(Timer2) IT2M2 IT2M1 R/W 0 0 INTT4(Timer4) IT4M2 IT4M1 R/W 0 0 INTT6(Timer6) IT6M2 IT6M1 R/W 0 0 INTTR8(Timer8) IT8M2 IT8M1 R/W 0 0 INTTRA(TimerA) ITAM2 ITAM1 R/W 0 0 INTTO8 ITO8M2 ITO8M1 R/W 0 0
Note: When any bit of WUPMASK is set to 1, INT0 will be disabled. Using INT0, set WUPMASK to "00H".
92CD54I-32
2006-01-27
TMP92CD54I
Symbol INTES0 NAME INTRX0 & INTTX0 Enable
Address
7 ITX0C R 0 ITX1C R 0 ICTC R 0 -
DBh
INTES1
INTRX1 & INTTX1 Enable
DCh
INTECRT
INTCR & INTCT Enable
DDh
5 INTTX0 ITX0M2 ITX0M1 R/W 0 0 INTTX1 ITX1M2 ITX1M1 R/W 0 0 INTCT ICTM2 ICTM1 R/W 0 0 INTSEE0 -
6
4 ITX0M0 0 ITX1M0 0 ICTM0 0 -
3 IRX0C R 0 IRX1C R 0 ICRC R 0 ICGC R 0
ISEM0C
INTECG
INTCG Enable
DEh
1 0 INTRX0 IRX0M2 IRX0M1 IRX0M0 R/W 0 0 0 INTRX1 IRX1M2 IRX1M1 IRX1M0 R/W 0 0 0 INTCR ICRM2 ICRM1 ICRM0 R/W 0 0 0 INTCG ICGM2 ICGM1 ICGM0 R/W 0 0 0* INTSEM0
ISEM0M2 ISEM0M1 ISEM0M0
2
INTESEE0
INTSEM0 & INTSEE0 Enable
DFh
ISEE0C
ISEE0M2 ISEE0M1 ISEE0M0
R 0
ISET0C
R/W 0 0 INTSET0 R/W 0 INTSBS2
0
R 0
ISER0C
R/W 0 0 INTSER0 R/W 0 INTRTC
IRTCM1
0
INTESED0
INTSER0 & INTSET0 Enable
E0h
ISET0M2 ISET0M1 ISET0M0
ISER0M2 ISER0M1 ISER0M0
R 0 -
0 -
0 -
R 0
IRTCC
0
0
IRTCM0
INTERTC INTRTC Enable
E1h
IRTCM2
R 0
ISBE2C
R/W 0 0 INTSBE2 R/W 0 0 INTSBE0 R/W 0 0 INTSBE1 R/W 0 0 INTTC0(DMA0) ITC0M2 ITC0M1 R/W 0 0 INTTC2(DMA2) ITC2M2 ITC2M1 R/W 0 0 INTTC4(DMA4) ITC4M2 ITC4M1 R/W 0 0 INTTC6(DMA6) ITC6M2 ITC6M1 R/W 0 0
0
INTESB2
INTSBE2 & INTSBS2 Enable
E2h
ISBS2C
ISBS2M2 ISBS2M1 ISBS2M0
ISBE2M2 ISBE2M1 ISBE2M0
R 0
ISBS0C
R/W 0 0 INTSBS0 R/W 0 0 INTSBS1 R/W 0 0 INTTC1(DMA1) ITC1M2 ITC1M1 R/W 0 0 INTTC3(DMA3) ITC3M2 ITC3M1 R/W 0 0 INTTC5(DMA5) ITC5M2 ITC5M1 R/W 0 0 INTTC7(DMA7) ITC7M2 ITC7M1 R/W 0 0
0
R 0
ISBE0C
0
INTESB0
INTSBE0 & INTSBS0 Enable
E3h
ISBS0M2 ISBS0M1 ISBS0M0
ISBE0M2 ISBE0M1 ISBE0M0
R 0
ISBS1C
0
R 0
ISBE1C
0
INTESB1
INTSBE1 & INTSBS1 Enable
E4h
ISBS1M2 ISBS1M1 ISBS1M0
ISBE1M2 ISBE1M1 ISBE1M0
R 0 ITC1C R 0 ITC3C R 0 ITC5C R 0 ITC7C R 0
0 ITC1M0 0 ITC3M0 0 ITC5M0 0 ITC7M0 0
R 0 ITC0C R 0 ITC2C R 0 ITC4C R 0 ITC6C R 0
0 ITC0M0 0 ITC2M0 0 ITC4M0 0 ITC6M0 0
INTETC01
INTTC0 & INTTC1 Enable INTTC2 & INTTC3 Enable
F1h
INTETC23
F2h
INTETC45
INTTC4 & INTTC5 Enable
F3h
INTETC67
INTTC6 & INTTC7 Enable
F4h
92CD54I-33
2006-01-27
TMP92CD54I
Symbol NAME Address 7 INMIC R 0 6 NMI F7h IWDC R 0 5 4 3 2 INTWD 1 0
NMI & INTNMWDT INTWD Enable
Interrupt request flag
lxxM2 0 0 0 0 1 1 1 1
LxxM1 0 0 1 1 0 0 1 1
lxxM0 0 1 0 1 0 1 0 1
Function ( write ) Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests
Note: After executing DI command previously, the setting value of "Interrupt priority setting register" should change.
(2) External interrupt control
Symbol NAME Address 7 6 5 4 3 2 1 I0LE 0 R/W 0 NMIREE 0
Interrupt
-
-
-
-
-
IIMC
Input Mode Control
F6H
(no RMW)
INT0 mode NMI mode 0:edge 0:Falling mode 1:level mode edge 1:Falling & rising edges
INT0 Level Enable 0 Rising edge detect INT 1 "H"level INT NMI rising edge Enable 0 INT request generation at falling edge 1 INT request generation at rising and falling edge Note 1 : Disable INT0 request before changing INT0 pin mode from level-sense to edge-sense. Then, execute EI instruction after waiting 3-cycles (3 times NOP instruction).
Setting example: DI LD (IIMC), XXXXXX0-B LD (INTCLR), 0AH NOP NOP NOP EI ; Disable interrupts ; Switches from level to edge. ; Clears interrupt request flag. ; Wait 3-cycles
; Enable interrupts Note: X = Don't care; "-" = No change.
Note 2 : See electrical characteristics in section 4 for external interrupt input pulse width.
92CD54I-34
2006-01-27
TMP92CD54I
Table 3.4.2 Settings of External interrupt Pin Function
Interrupt NMI Pin name NMI Mode Falling Edge Falling and Rising Edges Rising Edge High Level Rising Edge Rising Edge Rising Edge Rising Edge Rising Edge Falling Edge Rising Edge Rising Edge Falling Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge Falling and Rising Edges Falling Edge Rising Edge TMODA = 1,0 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 WUPMOD = 0 WUPMOD = 1 and WUPEDGE = 0 WUPMOD = 1 and WUPEDGE = 1 TMOD8 = 1,0 TMODA = 0,0 or 0,1 or 1,1 IIMC = 0 IIMC = 1 IIMC = 0 IIMC = 1 TMOD8 = 0,0 or 0,1 or 1,1 Setting method
INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7
INT0 PC0 PC2 PC3 PC5 PD0 PD1 PD4
WUINT0
PD0
WUINT1
PD1
WUINT2
PD2
WUINT3
PD3
WUINT4
PD4
WUINT5
PD5
WUINT6
PD6
WUINT7
PD7
92CD54I-35
2006-01-27
TMP92CD54I
(3) Interrupt request flag clear register The interrupt request flag is cleared by writing the appropriate micro DMA start vector, as given in Table 3.4.1, to the register INTCLR. For example, to clear the interrupt flag INT0, perform the following register operation after execution of the DI instruction.
INTCLR 0AH Symbol NAME Interrupt Clear control Address
F8H
(no RMW)
; Clears interrupt request flag INT0. 7 0 6 0 5 0 4 3 2 0 1 0 0 0
INTCLR
W 0 0 Interrupt Vector
(4) Micro DMA start vector registers These registers assign an interrupt source which makes a micro DMA processing start. The interrupt source whose micro DMA start vector value matches the vector set in one of these registers is designated as the micro DMA start source. When the micro DMA transfer counter value reaches zero, the micro DMA transfer end interrupt corresponding to the channel is sent to the interrupt controller, the micro DMA start vector register is cleared, and the micro DMA start source for the channel is cleared. Therefore, in order for micro DMA processing to continue, the micro DMA start vector register must be set again during processing of the micro DMA transfer end interrupt. If the same vector is set in the micro DMA start vector registers of more than one channel, the lowest numbered channel takes priority. Accordingly, if the same vector is set in the micro DMA start vector registers for two different channels, the interrupt generated on the lower-numbered channel is executed until micro DMA transfer is complete. If the micro DMA start vector for this channel has not been set in the channel's micro DMA start vector register again, micro DMA transfer for the higher-numbered channel will be commenced. (This process is known as micro DMA chaining.)
92CD54I-36
2006-01-27
TMP92CD54I
Symbol DMA0V NAME DMA0 Start Vector DMA1 Start Vector DMA2 Start Vector DMA3 Start Vector DMA4 Start Vector DMA5 Start Vector DMA6 Start Vector DMA7 Start Vector Address 100h
(no RMW)
7
-
6
-
5
DMA0V5
4
DMA0V4
3 2 DMA0 Start Vector
DMA0V3 DMA0V2
1
DMA0V1
0
DMA0V0
0
DMA1V5
0
DMA1V4
R/W 0 0 DMA1 Start Vector
DMA1V3 DMA1V2
0
DMA1V1
0
DMA1V0
DMA1V
101h
(no RMW)
-
R/W 0
DMA2V5
0
DMA2V4
0 0 DMA2 Start Vector
DMA2V3 DMA2V2
0
DMA2V1
0
DMA2V0
DMA2V
102h
(no RMW)
-
R/W 0
DMA3V5
0
DMA3V4
0 0 DMA3 Start Vector
DMA3V3 DMA3V2
0
DMA3V1
0
DMA3V0
DMA3V
103h
(no RMW)
-
R/W 0
DMA4V5
0
DMA4V4
0 0 DMA4 Start Vector
DMA4V3 DMA4V2
0
DMA4V1
0
DMA4V0
DMA4V
104h
(no RMW)
-
R/W 0
DMA5V5
0
DMA5V4
0 0 DMA5 Start Vector
DMA5V3 DMA5V2
0
DMA5V1
0
DMA5V0
DMA5V
105h
(no RMW)
-
R/W 0
DMA6V5
0
DMA6V4
0 0 DMA6 Start Vector
DMA6V3 DMA6V2
0
DMA6V1
0
DMA6V0
DMA6V
106h
(no RMW)
-
R/W 0
DMA7V5
0
DMA7V4
0 0 DMA7 Start Vector
DMA7V3 DMA7V2
0
DMA7V1
0
DMA7V0
DMA7V
107h
(no RMW)
-
R/W 0 0 0 0 0 0
(5) Specification of a micro DMA burst Specifying the micro DMA burst function causes micro DMA transfer, once started, to continue until the value in the Transfer Counter Register reaches zero. Setting any of the bits in the register DMAB which correspond to a micro DMA channel (as shown below) to 1 specifies that any micro DMA transfer on that channel will be a burst transfer.
Symbol DMAB
NAME DMA Burst
Address 108h
(no RMW)
7
DBST7
6
DBST6
5
DBST5
4
DBST4
3
DBST3
2
DBST2
1
DBST1
0
DBST0
R/W 0 0 0 0 0 0 0 0
92CD54I-37
2006-01-27
TMP92CD54I
(6) Notes The instruction execution unit and the bus interface unit in this CPU operate independently. Therefore if, immediately before an interrupt is generated, the CPU fetches an instruction which clears the corresponding interrupt request flag, the CPU may execute this instruction in between accepting the interrupt and reading the interrupt vector. In this case, the CPU will read the default vector 0004H and jump to interrupt vector address FFFF04H. To avoid this, an instruction which clears an interrupt request flag should always be preceded by a DI instruction. In addition, please note that the following two circuits are exceptional and demand special attention.
INT0 Level Mode
In Level Mode INT0 is not an edge-triggered interrupt. Hence, in Level Mode the interrupt request flip-flop for INT0 does not function. The peripheral interrupt request passes through the S input of the flip-flop and becomes the Q output. If the interrupt input mode is changed from Edge Mode to Level Mode, the interrupt request flag is cleared automatically. If the CPU enters the interrupt response sequence as a result of INT0 going from 0 to 1, INT0 must then be held at 1 until the interrupt response sequence has been completed. If INT0 is set to Level Mode so as to release a Halt state, INT0 must be held at 1 from the time INT0 changes from 0 to 1 until the Halt state is released. (Hence, it is necessary to ensure that input noise is not interpreted as a 0, causing INT0 to revert to 0 before the Halt state has been released.) When the mode changes from Level Mode to Edge Mode, interrupt request flags which were set in Level Mode will not be cleared. Interrupt request flags must be cleared using the following sequence. Also EI instruction should be execuse after waiting 3-cycle. DI LD (IIMC), 00H LD (INTCLR), 0AH NOP NOP NOP EI ; Switches from level to edge. ; Clears interrupt request flag. ; Wait 3-cycle
INTRX
The interrupt request flip-flop can only be cleared by a Reset or by reading the Serial Channel Receive Buffer. It cannot be cleared by an instruction.
Note: The following instructions or pin input state changes are equivalent to instructions which clear the interrupt request flag. INT0: Instructions which switch to Level Mode after an interrupt request has been generated in Edge Mode. The pin input changes from High to Low after an interrupt request has been generated in Level Mode. ("H" "L") INTRX: Instructions which read the Receive Buffer
92CD54I-38
2006-01-27
TMP92CD54I 3.4.4 Interrupt Mask register
TMP92CD54I has Interrupt Mask registers. Unlike Interrupt priority register, Interrupt mask register only disables or enables interrupts. An interrupt will not be generated, if the interrupt is disabled by Interrupt mask register, even if the interrupt has been enabled by setting Interrupt priority register. One, two or more interrupt factors can be prohibited synchronous by setting of Interrupt Mask register. After reset, all bits in Interrupt mask register are initialize 1 (enabled interrupts). It is necessary to write 0 in the corresponding bit in case of making interrupt Mask register to prohibit interrupt.
Internal I/O & external interrupts (except NMI, INTWD, INTTC0 to 7) SIO I2C
TMR
CAN
MASK
INTC
Interrupt Signals
Interrupt Mask registers
Data Bus Address Bus
Figure 3.4.4 Block Diagram of Interrupt Mask Control
Symbol
NAME
Address
7
MKI7
6
MKI6 1 INT6 0: Mask 1: Enable MKIT6 1 INTT6 0: Mask 1: Enable MKIRTC 1 INTRTC 0: Mask 1: Enable
5
MKI5 1 INT5 0: Mask 1: Enable MKIT5 1 INTT5 0: Mask 1: Enable MKITOA 1 INTTOA 0: Mask 1: Enable
4
MKI4 R/W 1 INT4 0: Mask 1: Enable MKIT4 R/W 1 INTT4 0: Mask 1: Enable MKITO8 1 INTTO8 0: Mask 1: Enable
3
MKI3 1 INT3 0: Mask 1: Enable MKIT3 1 INTT3 0: Mask 1: Enable MKITRB R/W 1 INTTRB 0: Mask 1: Enable
2
MKI2 1 INT2 0: Mask 1: Enable MKIT2 1 INTT2 0: Mask 1: Enable MKITRA 1 INTTRA 0: Mask 1: Enable
1
MKI1 1 INT1 0: Mask 1: Enable MKIT1 1 INTT1 0: Mask 1: Enable MKITR9 1 INTTR9 0: Mask 1: Enable
0
MKI0 1 INT0 0: Mask 1: Enable MKIT0 1 INTT0 0: Mask 1: Enable MKITR8 1 INTTR8 0: Mask 1: Enable
Interrupt
INTMK0
Mask Control 0
E5H
1 INT7 0: Mask 1: Enable MKIT7
Interrupt
INTMK1
Mask Control 1
E6H
1 INTT7 0: Mask 1: Enable -
Interrupt
INTMK2
Mask Control 2
E7H
-
92CD54I-39
2006-01-27
TMP92CD54I
Symbol NAME Address 7
Interrupt -
6
MKICG 1 INTCG 0: Mask 1: Enable
5
MKICT 1 INTCT 0: Mask 1: Enable -
4
MKICR 1 INTCR 0: Mask 1: Enable -
3
MKITX1 R/W 1 INTTX1 0: Mask 1: Enable MKISET0 1 INTSET 0: Mask 1: Enable
2
MKIRX1 1 INTRX1 0: Mask 1: Enable MKISER0 1 INTSER 0: Mask 1: Enable MKISBE1 1 INTSBE1 0: Mask 1: Enable
1
MKITX0 1 INTTX0 0: Mask 1: Enable MKISEE0 1 INTSEE 0: Mask 1: Enable MKISBS0 1 INTSBS0 0: Mask 1: Enable
0
MKIRX0 1 INTRX0 0: Mask 1: Enable MKISEM0 1 INTSEM 0: Mask 1: Enable MKISBE0 1 INTSBE0 0: Mask 1: Enable
INTMK3
Mask Control 3
E8H
Interrupt -
-
R/W E9H
INTMK4
Mask Control 4
Interrupt -
MKISBS2 1 INTSBS2 0: Mask 1: Enable
MKISBE2 1 INTSBE2 0: Mask 1: Enable
MKIAD 1 INTAD 0: Mask 1: Enable
MKISBS1 R/W 1 INTSBS1 0: Mask 1: Enable
INTMK5
Mask Control 5
EAH
Maskable bit for INTAD request
0 INTAD is disabled 1 INTAD is enabled
Note: Port D0, D1 and D4 have 2 kinds of interrupt source (PD0:INT5/WUINT0, PD1:INT6/WUINT1, PD4:INT7/WUINT4). If both interrupt requests are generated in both interrupt enabled status, both interrupt processing will be executed. When any of these interrupts is used, set Interrupt Mask register or Wake UP Mask register to enable/disable.
Example of register setting: In the case of setting INT0 interrupt priority level to 7 from 3.
LD (INTE0AD), 03H LD (INTMK0), 01H EI : : DI LD (INTMK0), 00H LD (INTE0AD), 07H LD (INTCLR), 0AH NOP NOP NOP LD (INTMK0), 01H EI ; Set INT0 level to 3 ; Enable INT0 ; Enable interrupt operation ; running program ; Disable interrupt operation ; Disable INT0 ; Set INT0 level to 7 ; Clear INT0 request ; Wait 3 cycles
; Enable INT0 ; Enable interrupt operation
92CD54I-40
2006-01-27
TMP92CD54I 3.4.5. ON/OFF LOGIC
TMP92CD54I has 8 pins (WUINT0 to WUINT7) for wake up from standby mode. These pins are multiplexed with Port D (PD0 to PD7). All wake up events can release standby mode and triggering edge can be independently programmable as both rising and falling edge, rising edge or falling edge. It is possible to mask all wake up events independently.
WUINT0
WUINT1
WUINT2
WUINT3
WUINT4
WUINT5
WUINT6
External Interrupts
WUINT7
Edge select & Interrupt Mask
A
INT0 INT0
8OR
B Selector S
Interrupt Controller Clock Control etc.
8OR
INTMK0
Mode control register Edge select register Flag status register Mask Register
Internal bus
Figure 3.4.5 Block diagram of ON/OFF logic
Using ON/OFF logic, all interrupt signals of WUINT0 to 7 are sent to INT0 in internal logic. When any WUINTn requests are generated, INT0 interrupt request will be generated. Like external INT0, also INT0 from WUINTn is set disable/enable by Interrupt priority register or Interrupt mask register. Writing 1 to any bit in WUPMASK register, INT0 switches ON/OFF logic mode. In this case, WUINTn written 1 in WUPMASK register are enabled, external INT0 cannot use. When external INT0 is used, write 00 to WUPMASK register. Selection edge of WUINTn signal uses WUPMOD and WUPEDGE register, rising edge, falling edge or both falling and rising edge are selectable. Reading WUPFLAG register, request/no-request of WUINTn will be confirmed.
92CD54I-41
2006-01-27
TMP92CD54I
Wake UP FLAG status Register
7 6
WFLG6
5
WFLG5
4
WFLG4
3
WFLG3
2
WFLG2
1
WFLG1
0
WFLG0
WUPFLAG
Symbol Read/Write After reset function
WFLG7
R/W
0
WUINT7 0:NO request 1: request
0
WUINT6 0:NO request 1: request
0
WUINT5 0:NO request 1: request
0
WUINT4 0:NO request 1: request
0
WUINT3 0:NO request 1: request
0
WUINT2 0:NO request 1: request
0
WUINT1 0:NO request 1: request
0
WUINT0 0:NO request 1: request
(00ECH)
Wake UP Mode Control Register
7 6
WMD6
5
WMD 5
4
WMD4
3
WMD3
2
WMD2
1
WMD1
0
WMD0
Symbol Read/Write After reset
WUPMOD
WMD7
R/W
0
WUINT7 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT6 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT5 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT4 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT3 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT2 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT1 0:Falling & Rising Edge 1:Falling or Rising Edge
0
WUINT0 0:Falling & Rising Edge 1:Falling or Rising Edge
(00EDH) function
Wake UP Edge Select Register
7 6
WED6
5
WED 5
4
WED4
3
WED3
2
WED2
1
WED1
0
WED0
WUPEDGE
Symbol Read/Write After reset function
WED7
R/W
0
WUINT7 0:Falling Edge 1:Rising Edge
0
WUINT6 0:Falling Edge 1:Rising Edge
0
WUINT5 0:Falling Edge 1:Rising Edge
0
WUINT4 0:Falling Edge 1:Rising Edge
0
WUINT3 0:Falling Edge 1:Rising Edge
0
WUINT2 0:Falling Edge 1:Rising Edge
0
WUINT1 0:Falling Edge 1:Rising Edge
0
WUINT0 0:Falling Edge 1:Rising Edge
(00EEH)
Note:
WUPEDGE register is used with setting each WUPMOD to 1. If each WUPMOD is clear to 0, WUPEDGE is disabled.
Wake UP Mask Register
7 WUPMASK 6
WMK6
5
WMK5
4
WMK4
3
WMK3
2
WMK2
1
WMK1
0
WMK0
(00EFH)
Symbol Read/Write After reset function
WMK7
R/W
0
WUINT7 0: Disable 1: Enable
0
WUINT6 0: Disable 1: Enable
0
WUINT5 0: Disable 1: Enable
0
WUINT4 0: Disable 1: Enable
0
WUINT3 0: Disable 1: Enable
0
WUINT2 0: Disable 1: Enable
0
WUINT1 0: Disable 1: Enable
0
WUINT0 0: Disable 1: Enable
Wake up interrupt mask control 0 WUINTn Disabled (MASK) 1 WUINTn Enabled Note1: Port D0, D1 and D4 have 2 kinds of interrupt source (PD0: INT5/WUINT0, PD1: INT6/WUINT1, PD4:INT7/WUINT4). If both interrupt requests are generated in both interrupt enabled status, both interrupt processing will be executed. When each interrupts is used, set Interrupt Mask register or Wake UP Mask register to enable/disable. Even if port D is any of Input/Output port, INTn, and WUINTn, the level of port D is inputted into these interrupts. For details, refer to the block diagram of the port. When any WUPMASK is set to 1, external INT0 will be disabled. Using INT0, set WUPMASK to "00H".
Note2:
92CD54I-42
2006-01-27
TMP92CD54I
Example of register setting: To set WUINT0 with rising edge and set interrupt level 3, set the registers as follows:
DI LD (INTMK0), 00H LD (PDFC), 00H LD (PDCR), 00H LD (WUPMOD), 01H LD (WUPEDGE), 01H LD (WUPFLAG), 00H LD (INTE0AD), 03H LD (INTCLR), 0AH NOP NOP NOP LD (INTMK0), 01H EI ; Disable interrupt operation ; Disable INT0 ; Set PD0 as port mode ; Set PD0 as input mode ; Set WUINT0 as "Falling or rising edge" ; Set WUINT0 to "Rising edge" ; Clear WUINT0 flag ; Set INT0 (function as WUINT0) interrupt level to 3 ; Clear INT0 request flag ; Wait 3 cycles
; Enable WUINT0 ; Enable interrupt operation
92CD54I-43
2006-01-27
TMP92CD54I
3.5 Function of Ports
TMP92CD54I has I/O port pins that are shown in table 3.5.1. In addition to functioning as general-purpose I/O ports, these pins are also used by internal CPU and I/O functions. Table 3.5.1 Port Functions (1/2)
Port Name Pin Name Number of Pins I/O I/O Setting Pin Name for built-in function
Port 0 Port 4 Port 7
P00 to P07 P40 to P47 P70 P71 P72 P73 P74 P75
8 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 4 1 1 1 1 1 1 1 1 1 1 1 1
I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O Input Input I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O
Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit (Fixed) (Fixed) Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit
D0 to D7 A0 to A7
RD WR
SI2/SCL2
CS
WAIT
Port C
PC0 PC1 PC2 PC3 PC4 PC5
TI0 / INT1 TO1 TO3 / INT2 TI4 / INT3 TO5 TO7 / INT4 TI8 / INT5 / A16 / WUINT0 TI9 / INT6 / A17 / WUINT1 TO8 / A18 / WUINT2 TO9 / A19 / WUINT3 TIA / INT7 / A20 / WUINT4 TIB / A21 / WUINT5 TOA / A22 / WUINT6 TOB / A23 / WUINT7 TXD0 RXD0 SCLK0 / CTS0 TXD1 RXD1 SCLK1 / CTS1 TX RX AN0 to AN7 AN8 to AN11
SS / A8
Port D
PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7
Port F
PF0 PF1 PF2 PF3 PF4 PF5 PF6 PF7
Port G Port L Port M
PG0 to PG7 PL0 to PL3 PM0 PM1 PM2 PM3 PM4
MOSI / A9 MISO / A10 SECLK / A11 SCK2 SCK0 SO0 / SDA0 SI0 / SCL0 SCK1 / A12 SO1 / SDA1 / A13 SI1 / SCL1 / A14 SO2 / SDA2 / A15
Port N
PN0 PN1 PN2 PN3 PN4 PN5 PN6
92CD54I-44
2006-01-27
TMP92CD54I 3.5.1 Port 0 (P00 to P07)
Port0 is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P0CR and function register P0FC. In addition to functioning as a general-purpose I/O port, port0 can also function as a data bus (D0 to D7). P0CR register P0FC register
External write strobe
P0 register
S 0
Port 0 P00 to P07 (D0 to D7)
External write data
S
1 Selector 1 0 Selector
Port read data External read data External read strobe
Figure 3.5.1 Port0 Table 3.5.2 Port0 Registers
SYMBOL
NAME PORT0
Address 00H
7 P07 0 P07C
6 P06 0 P06C 0 -
5 P05 0 P05C 0 -
4 P04
3 P03
2 P02 0 P02C 0 -
1 P01 0 P01C 0 -
0 P00 0 P00C 0 P0F W 0
P0
P0CR
PORT0 Control Register PORT0 Function Register
02H (no RMW)
0 -
R/W 0 0 Input/Output P04C P03C W 0 0 0:Input 1:Output -
P0FC
03H (no RMW) 0:PORT 1:Data Bus(D7 to D0)
P0FC P0CR 0 1
0 Input port Output port
1 Data bus (D0 to D7) Data bus (D0 to D7)
92CD54I-45
2006-01-27
TMP92CD54I 3.5.2 Port 4 (P40 to P47) Port4 is an 8-bit general-purpose I/O ports. Bits can be individually set as either inputs or outputs by control register P4CR and function register P4FC. In addition to functioning as a general-purpose I/O port, port4 can also function as an address bus (A0 to A7).
P4CR register P4FC register
(reserved)
P4 register
S 0 1 Selector S 1 0 Selector S 0 1 Selector
Address bus (reserved) Port read data (reserved)
Port4 P40 to P47 (A0 to A7)
(reserved)
Figure 3.5.2 Port4 Table 3.5.3 Port4 Registers
SYMBOL
NAME PORT4
Address 10H
7 P47 0 P47C
6 P46 0 P46C 0 P46F 0
5 P45 0
4 P44
3 P43
2 P42
1 P41 0 P41C 0 P41F 0
0 P40 0 P40C 0 P40F 0
P4
P4CR
PORT4 Control Register PORT4 Function Register
12H (no RMW)
0 P47F
P4FC
13H (no RMW)
0
R/W 0 0 0 Input/Output P45C P44C P43C P42C W 0 0 0 0 0:Input 1:Output P45F P44F P43F P42F W 0 0 0 0 0:PORT 1:Address Bus(A0 to A7)
P4FC P4CR 0 1
0 Input port Output port
1 Address bus (A0 to A7) Don't use this setting.
92CD54I-46
2006-01-27
TMP92CD54I 3.5.3 Port 7 (P70 to P75)
Port7 is a 6-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P7CR and function register P7FC. In addition to functioning as a general-purpose I/O port, P70, P71 and P73 pins can also function as read/write strobe signals and chip selection to connect with an external memory. P72 pin can also function as I/O functions of serial bus interface which employs clocked-synchronous 8-bit SIO and I2C. P75 pin can also function as wait input. The pin is always enabled for the following input signals: SBI data input (SIO) SI2#1, SBI clock I/O (I2C) SCL2#1,. #1 : In IDLE3/STOP mode, input signal is valid (Input gate opened) A reset initializes P70, P71, P73 and P74 pins to output port mode, and P72, P75 pin to input port mode.
P7CR register P7FC register P7 register
Read strobe Port read data
S 1 0 Selector 0 S
1 Selector
P70 (RD )
P7CR register P7FC register
P7 register
Write strobe Port read data
S 1 0 Selector
0 1
S
Selector
P71 ( WR )
P7CR register P7FC register P7 register
(reserved)
0 S 0 1 S Selector 1 0 Selector S
When PNODE register is "1", P72 signal is open drain output.
SCL output Port read data SI/SCL input
1 Selector
P72 (SI2/SCL2)
Figure 3.5.3 Port7 (P70 to P72)
92CD54I-47
2006-01-27
TMP92CD54I
P7CR register P7FC register P7 register
Chip selection
S S
0 1
Selector 1 0
P73 ( CS )
Port read data
Selector
P7CR register P7FC register P7 register
(reserved)
S S
0 1
P74
Selector 1 0
Port read data
Selector
P7CR register P7FC register
P7 register
P75 ( WAIT )
S
1 0
Port read data Wait request
Selector
Figure 3.5.4 Port7 (P73 to P75)
92CD54I-48
2006-01-27
TMP92CD54I
Table 3.5.4 Port7 Registers
SYMBOL
NAME PORT7
Address 1CH
7 -
6 -
5 P75 0 P75C 0 P75F 0 0:PORT 1: WAIT
4 P74 1 P74C 1 P74F 0 0:PORT
3 P73
2 P72
1 P71 1 P71C 1 P71F 0 0:PORT 1: WR
0 P70 1 P70C 1 P70F 0 0:PORT 1:RD
P7
P7CR
PORT7 Control Register
1EH (no RMW)
-
P7FC
PORT7 Function Register
1FH (no RMW)
-
R/W 1 1 Input/Output P73C P72C W 1 0 0:Input 1:Output P73F P72F W 0 0 0:PORT 0:PORT 1: CS 1:SI2 SCL2
Note1
P7CR 0 1 1
P7FC 0 0 1
-
-
P75
P74 Input Port Don't use this setting. Don't use this setting.
P73
P72
Input Port,
P71
P70
WAIT
SI2 Output Port Don't use this CS setting.
Input Port
WR
RD
0
1
WAIT
CS
SI2, SCL2
WR
RD
Note1: P72 SCL2, clock input/output at I2C mode, can be open-drain output by setting 1 to PNODE.
92CD54I-49
2006-01-27
TMP92CD54I 3.5.4 Port C (PC0 to PC5) PortC is a 6-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register PCCR and function register PCFC. In addition to functioning as a general-purpose I/O port, PortC can also function as 8-bit timer I/O and interrupt input. The pin is always enabled for the following input signals: timer inputs TI0#1, TI4#1. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed) A reset initializes PortC to input port mode.
PCCR register PCFC register PC register
(Reserved) Port read data Timer input Interrupt request
S 1 0 1 0 S
PC0 (TI0/INT1) PC3 (TI4/INT3)
PCCR register PCFC register PC register
(Reserved) Timer output
1 0 S 1 0 S 1 0 S
PC1 (TO1) PC2 (TO3/INT2)
Port read data Interrupt request
PCCR register PCFC register PC register
Timer output
S 1 0 0 1 S
PC4 (TO5) PC5 (TO7/INT4)
Port read data Interrupt request
Figure 3.5.5 PortC (PC0 to PC5)
92CD54I-50
2006-01-27
TMP92CD54I
Table 3.5.5 PortC Registers
SYMBOL
NAME PORTC
Address 30H
7 -
6 -
5 PC5 0 PC5C 0 PC5F 0 0:PORT INT4 1:TO7
4 PC4 0 PC4C 0 PC4F 0 0:PORT 1:TO5
3 PC3
2 PC2
1 PC1 0 PC1C 0 PC1F 0 0:PORT 1:TO1
0 PC0 0 PC0C 0 PC0F 0 0:PORT INT1 TI0
PC
PCCR
PORTC Control Register
32H (no RMW)
-
PCFC
PORTC Function Register
33H (no RMW)
-
R/W 0 0 Input/Output PC3C PC2C W 0 0 0:Input 1:Output PC3F PC2F W 0 0 0:PORT 0:PORT INT3 INT2 TI4 1:TO3
PCCR 0 1 1 0
PCFC 0 0 1 1
-
-
PC5
PC4
PC3
PC2
PC1
PC0
Input Port, Input Port, Input Port, Input Port, Input Port Input Port INT3, INT1, INT4 INT2 TI4 TI0 Output Port TO7 TO5 Output Port TO3 TO1 Output Port TO7 TO5 Do not use this setting
92CD54I-51
2006-01-27
TMP92CD54I 3.5.5 Port D (PD0 to PD7) PortD is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register PDCR and function register PDFC. In addition to functioning as a general-purpose I/O port, PortD can also function as 16-bit timer I/O, interrupt input and wake up interrupt input. The pin is always enabled (excluding address bus setting) for the following input signals: 16-bit timer input TI8#1, TI9#1, TIA#1, TIB#1, external interrupt INT5#2 to INT7#2, wake up interrupt WUINT0#2 to WUINT7#2. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed) #2 : In IDLE3/STOP mode, input signal is valid (Input gate opened) A reset initializes Port D to input port mode.
PDCR register PDFC register PD register
0
S 1 Selector S
Address bus
1 0 Selector
PD0 (TI8/INT5/A16/WUINT0) PD1 (TI9/INT6/A17/WUINT1) PD4 (TIA/INT7/A20/WUINT4) PD5 (TIB/A21/WUINT5)
Port read data
Interrupt request Timer input Wake up request
PDCR register PDFC register
PD register
S 0 1 Selector S 1 0 Selector S 0 1 Selector
Address bus Timer output Port read data
PD2 (TO8/A18/WUINT2) PD3 (TO9/A19/WUINT3) PD6 (TOA/A22/WUINT6) PD7 (TOB/A23/WUINT7)
Wake up request
Figure 3.5.6 PortD
92CD54I-52
2006-01-27
TMP92CD54I
Table 3.5.6 PortD Registers
SYMBOL
NAME PORTD
Address 34H
7 PD7 0 PD7C
6 PD6 0 PD6C 0 PD6F 0 0:PORT WUINT6 1:TOA A22
5 PD5 0 PD5C 0 PD5F 0 0:PORT TIB WUINT5 1:A21
4 PD4
3 PD3
2 PD2 0 PD2C 0 PD2F 0 0:PORT WUINT2 1:TO8 A18
1 PD1 0 PD1C 0 PD1F 0 0:PORT TI9 INT6 WUINT1 1:A17
0 PD0 0 PD0C 0 PD0F 0 0:PORT TI8 INT5 WUINT0 1: A16
PD
PDCR
PORTD Control Register
36H (no RMW)
0 PD7F
PDFC
PORTD Function Register
37H (no RMW)
0 0:PORT WUINT7 1:TOB A23
R/W 0 0 Input/Output PD4C PD3C W 0 0 0:Input 1:Output PD4F PD3F W 0 0 0:PORT 0:PORT TIA WUINT3 INT7 1:TO9 WUINT4 A19 1:A20
PDCR 0 1 1 0
PDFC 0 0 1 1
PD7
PD6
PD5
PD4
PD3
PD2
PD1
PD0
Input Port, Input Port, Input Port, Input Port, Input Port, Input Port, Input Port, Input Port, INT5, INT6, INT7, TIB, TI8, TI9, WUINT3 WUINT2 WUINT7 WUINT6 TIA, WUINT5 WUINT1 WUINT0 WUINT4 Output Port TI8, TIA, TI9, TIB, TOB TOA, TO9 TO8 INT5, INT7, INT6, WUINT5 WUINT4 WUINT1 WUINT0 A23 A22 A21 A20 A19 A18 A17 A16
Note: Port D0, D1 and D4 have 2 kinds of interrupt source (PD0: INT5/WUINT0, PD1: INT6/WUINT1, PD4: INT7/WUINT4). If both interrupt requests are generated in both interrupt enabled status, both interrupt processing are executed. When each interrupts is used, set Interrupt Mask register or Wake UP Mask register to enable/disable. If these ports are used as output/input ports, first, disable interrupt request, then set PDFC and PDCR (cf Timers).
92CD54I-53
2006-01-27
TMP92CD54I 3.5.6 Port F (PF0 to PF7)
PortF is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or o outputs by control register PFCR and function register PFFC. In addition to functioning as a general-purpose I/O port, PortF can also function as serial channels I/O function and controller area network (CAN). The pin is always enabled for the following input signals: serial receive data RXD0#1, RXD1#1, CAN receive data RX#1, Clear-to-send CTS0#1, CTS1#1, and serial clock SCLK0#1, SCLK1#1. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed) A reset initializes PortF to input port mode.
PFCR register PFFC register
When PFCR register is "0" and PFFC register is "1", TXD is open drain output.
S 0
PF register
PF0 (TXD0) PF3 (TXD1)
TXD output
S 1 0 Selector
1 Selector
Port read data
PFCR register PFFC register
PF register
S 0
PF6 (TX)
TX output
S 1 0 Selector
1 Selector
Port read data
Figure 3.5.7 PortF (PF0, PF3, PF6)
92CD54I-54
2006-01-27
TMP92CD54I
PFCR register PFFC register
PF register
PF1 (RXD0)
S
Port read data RXD input
1 0
PF4 (RXD1) PF7 (RX)
Selector
PFCR register PFFC register
PF register
S 0 1 Selector S 1 0 Selector S 0 1 Selector
(reserved) SCLK output Port read data SCLK input CTS input
PF2 (SCLK0/CTS0) PF5 (SCLK1/CTS1)
Figure 3.5.8 PortF (PF1, PF2, PF4, PF5, PF7)
92CD54I-55
2006-01-27
TMP92CD54I
Table 3.5.9 PortF Registers
SYMBOL
NAME PORTF
Address 3CH
7 PF7 0 PF7C
6 PF6 0 PF6C 0 PF6F 0 0:PORT 1:TX
5 PF5 0 PF5C 0 PF5F 0 0:PORT CTS1 1:SCLK1
4 PF4
3 PF3
2 PF2 0 PF2C 0 PF2F 0 0:PORT CTS0 1:SCLK0
1 PF1 0 PF1C 0 PF1F 0 0:PORT 1:RXD0
0 PF0 0 PF0C 0 PF0F 0 0:PORT 1:TXD0
PF
PFCR
PORTF Control Register
3EH (no RMW)
0 PF7F
PFFC
PORTF Function Register
3FH (no RMW)
0 0:PORT 1:RX
R/W 0 0 Input/Output PF4C PF3C W 0 0 0:Input 1:Output PF4F PF3F W 0 0 0:PORT 0:PORT 1:RXD1 1:TXD1
PFCR
PFFC
PF7 Input Port, RX
PF6 Input Port
PF5 Input Port, SCLK1 (Input), CTS1 SCLK1 (Output) Don't use this Setting.
PF4 Input Port, RXD1
PF3 Input Port
PF2 Input Port, SCLK0 (Input), CTS0 SCLK0 (Output) Don't use this Setting.
PF1 Input Port, RXD0
PF0 Input Port
0
0
1 1 0
0 1 1 RX RX TX TX
Output Port RXD1 RXD1 TXD1 TXD1 (Open Drain) RXD0 RXD0 TXD0 TXD0 (Open Drain)
92CD54I-56
2006-01-27
TMP92CD54I 3.5.7 Port G (PG0 to PG7) PortG is an 8-bit general-purpose input-only port. In addition to functioning as a general-purpose input-only port, PortG can also function as input functions of AD converter. The pin is always enabled for the following input signals: AD converter input AN0#1 to AN7#1. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed)
Port read data
PortG
PG0 to PG7 (AN0 to AN7)
AD converter input
Figure 3.5.9 PortG
Table 3.5.8 PortG Register
SYMBOL
NAME PORTG
Address 40H
7 PG7
6 PG6
5 PG5
4 PG4 R Input
3 PG3
2 PG2
1 PG1
0 PG0
PG
92CD54I-57
2006-01-27
TMP92CD54I 3.5.8 Port L (PL0 to PL3) PortL is a 4-bit general-purpose input-only port. In addition to functioning as a general-purpose input-only port, PortL can also function as input functions of AD converter. The pin is always enabled for the following input signals: AD converter input AN8#1 to AN11#1. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed)
Port read data
PortL
PL0 to PL3 (AN8 to AN11)
AD converter input
Figure 3.5.10 PortL
Table 3.5.9 PortL Register
SYMBOL
NAME PORTL
Address 54H
7 -
6 -
5 -
4 -
3 PL3
2 PL2 R Input
1 PL1
0 PL0
PL
92CD54I-58
2006-01-27
TMP92CD54I 3.5.9 Port M (PM0 to PM4) PortM is a 5-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register PMCR and function register PMFC. In addition to functioning as a general-purpose I/O port, PM0 to PM3 can also function as I/O functions of serial expansion interface. PM4 can also function as I/O function of serial bus interface which employs clocked-synchronous 8-bit SIO.
The pin is always enabled for the following input signals: slave select SS #1, transmitting/ receiving serial data MOSI#1, MISO#1, SEI clock SECLK#1. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed) A reset initializes PortM to input port mode.
PMCR register PMFC register PM register
0
S 1 Selector S 1 0 Selector
Address bus
PM0 ( SS /A8)
Port read data
SS input SEI monitor MOSI, MISO, SECLK output enable
PMCR register PMFC register
When PMODE register is "1", PM1 to PM3 signals are open drain output.
S 0 1 Selector S 1 0 Selector
PM register
Address bus MOSI output MISO output SECLK output Port read data MOSI input MISO input SECLK input
0 1 Selector S
PM1 (MOSI/A9) PM2 (MISO/A10) PM3 (SECLK/A11)
Figure 3.5.11 PortM (PM0 to PM3)
92CD54I-59
2006-01-27
TMP92CD54I
PMCR register PMFC register
PM register
(reserved)
0 S 1 Selector S 1 0 Selector S 0 1 Selector
SCK output Port read data
PM4 (SCK2)
SCK input
Figure 3.5.12 PortM (PM4) Table 3.5.10 PortM Registers
SYMBOL
NAME PORTM
Address 58H
7 -
6 -
5 -
4 PM4 0 -
PM
PMODE
PORTM Open Drain Enable Register
59H
PMCR
PORTM Control Register
5AH (no RMW) -
-
-
PM4C 0 PM4F 0 0:PORT 1:SCK2
PMFC
PORTM Function Register
5BH (no RMW)
-
2 1 PM2 PM1 R/W 0 0 0 Input/Output ODEM3 ODEM2 ODEM1 R/W 0 0 0 PM1 PM2 PM3 output output output 0:CMOS 0:CMOS 0:CMOS 1:Open 1:Open 1:Open Drain Drain Drain PM3C PM2C PM1C W 0 0 0 0:Input 1:Output PM3F PM2F PM1F W 0 0 0 0:PORT 0:PORT 0:PORT 1:SECLK A11 PM3 Input Port 1:MISO A10 PM2 Input Port Output Port 1:MOSI A9 PM1 Input Port
3 PM3
0 PM0 0 -
PM0C 0 PM0F 0 0:PORT 1: SS A8 PM0 Input Port,
SS
PMCR 0 1 1 0
PMFC 0 0 1 1
-
-
-
PM4 Input Port, SCK2 (Input) SCK2 (Output) Don't use this setting
-
-
-
SECLK A11
MISO A10
MOSI A9
SS
A8
92CD54I-60
2006-01-27
TMP92CD54I 3.5.10 Port N (PN0 to PN6) PortN is a 7-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register PNCR and function register PNFC. In addition to functioning as a general-purpose I/O port, PortN can also function as I/O functions of serial bus interface which employs clocked-synchronous 8-bit SIO and I2C. The pin is always enabled for the following input signals: SBI clock I/O (SIO) SCK0#1, SCK1#1, SBI data input (SIO) SI0#1, SI1#1, SBI clock I/O (I2C) SCL0#1, SCL1#1, SBI data I/O (I2C) SDA0#1, SDA1#1, SDA2#1. #1 : In IDLE3/STOP mode, input signal is invalid (Input gate closed) A reset initializes PortN to input port mode.
PNCR register PNFC register
PN register
Address bus
0 S 1 Selector S 1 0 Selector S 0 1 Selector
SCK output Port read data
PN0 (SCK0) PN3 (SCK1/A12)
SCK input
PNCR register PNFC register
When PNODE register is "1", PN1, PN2, PN4, PN5 and PN6 signals are open drain output.
PN register
Address bus SO/SDA output SCL output Port read data SDA input SI/SCL input
0 1 Selector S 1 0 Selector S S 0 1 Selector
PN1 (SO0/SDA0) PN2 (SI0/SCL0) PN4 (SO1/SDA1/A13) PN5 (SI1/SCL1/A14) PN6 (SO2/SDA2/A15)
Figure 3.5.13 PortN
92CD54I-61
2006-01-27
TMP92CD54I
Table 3.5.11 PortN Registers
SYMBOL PN NAME PORTN Address 5CH 7 6 PN6 0 5 PN5 0 4 PN4 0 3 PN3 2 PN2 1 PN1 0 PN0
PORTN Open Drain PNODE Enable Register
PNCR
PORTN Control Register
PNFC
PORTN Function Register
R/W 0 0 0 0 Input/Output ODE72 ODEN6 ODEN5 ODEN4 ODEN2 ODEN1 R/W R/W 0 0 0 0 0 0 P72 PN6 PN5 PN4 PN2 PN1 5DH output output output output output output 0:CMOS 0:CMOS 0:CMOS 0:CMOS 0:CMOS 0:CMOS 1:Open 1:Open 1:Open 1:Open 1:Open 1:Open Drain Drain Drain Drain Drain Drain PN6C PN5C PN4C PN3C PN2C PN1C PN0C W 5EH (no RMW) 0 0 0 0 0 0 0 0:Input 1:Output PN6F PN5F PN4F PN3F PN2F PN1F PN0F W 0 0 0 0 0 0 0 5FH 0:PORT 0:PORT 0:PORT 0:PORT 0:PORT 0:PORT 0:PORT (no RMW) 1:SCK1 SI0 1:SO0 1:SCK0 1:SO1 SI1 1: SO2 A12 1:SCL0 SDA0 SDA1 SDA2 1:SCL1 A13 A14 A15
PNCR 0 1 1 0
PNFC 0 0 1 1
-
PN6 Input Port
PN5 Input Port, SI1
PN4
PN3
PN2 Input Port, SI0
PN1 Input Port
PN0 Input Port, SCK0 (Input)
SO2/SDA2
SCL1 A14
A15
Input Input Port, Port SCK1 (Input) Output Port SCK1 SO1/SDA1 (Output) A13 A12
SCL0
SCK0 (Output) Don't use this setting.
SO0/SDA0
92CD54I-62
2006-01-27
TMP92CD54I
3.6 Memory Controller
3.6.1 Memory controller functions
TMP92CD54I has a memory controller with a variable 1-block external address area. The function is as follows. (1) 1-block external address area support. It specifies: A start address A block size for 1-block external address area (2) Connecting memory specifications. It specifies: SRAM ROM as memories to connect with the selected address area. (3) Data bus size 8-bit (4) Wait control Wait specification Wait input pin Both control the number of waits in the external access bus cycle. Read and write cycles can specify the number of waits individually. There are five modes all together: 0 wait, 1 wait, 2 wait, 3 wait, N wait (N is controlled with WAIT pin)
3.6.2
Control register and Operation after reset release
This section describes the registers that control the memory controller, the state after reset release and necessary settings. (1) Control Registers Control registers (BCSH/BCSL: Block Chip Select High / Low) Sets the connecting memory type. (SRAM, ROM) Sets the number of waits to be read and written. Memory Start Address Register (MSAR) Sets a start address in the selected address areas. Memory Address Mask Register (MAMR) Sets a block size in the selected address areas. (2) Operation after reset release After reset release, The block address areas (specified by MSAR and MAMR) are set to address 000000H and FFFFEFH. Then BCSL / H is set. Set BCSH to 1 to enable the setting.
92CD54I-63
2006-01-27
TMP92CD54I 3.6.3 Basic functions and registers setting
In this section, Block address area specification, wait control and basic bus sizing are described.
(1) Block address area specification
If the bit BCSH is set to 0, then the block address area is set to addresses 000000H to FFFFEFH, which disables the use of both registers MSAR and MAMR. If the bit BCSH is set to 1, then the block address area is programmable. Therefore, the start address is set using MSAR (Memory Start Address register). MAMR (Memory Address Mask Register) sets the size of the block in the selected address area. The principle is to mask or enable the comparison of each bit of the address. The combination of masked / enabled bits give the block size. Then the memory controller compares (every bus cycle) the register value and the address in order to check whether it is an access to the external memory or not. Note that an address bit masked by MAMR (Memory Address Mask Register) is not compared. If the compared result is a match the memory controller sets the chip select signal CS to low. Figure 3.6.1 shows an example of connecting external memory to TMP92CD54I. In the example, RAM is connected using an 8-bit bus.
Address CS CS
TMP92CD54I
OE RD WR Data (D0 to D7)
RAM
WE
Figure 3.6.1 Example of connecting external memory (external RAM)
92CD54I-64
2006-01-27
TMP92CD54I
(i) Setting memory start address register The MS23 to 16 bits of MSAR respectively correspond with addresses A23 to A16. The lower start address A15 to 0 is always set to address 0000H. Therefore, the start addresses of the block address area are set to addresses 000000H to FF0000H every 64KB (Because the settable LSB bit is 16th; 216 = 64 KB) (ii) Setting memory address mask register MAMR sets whether an address bit is compared or not. Set the register to 0 to compare, or to 1 not to compare. The combination of masked / enabled bits give the block size and therefore the address bit to be set depends on the block address area. Note: A23 is always compared. Thus, the block address area is between A22 and A15. The size to be set depending on the block address area is as follows:
Size (bytes) CS area
256
512
32 K
64 K
128 K
256 K
512 K
1M
2M
4M
8M
CS
Note: After reset release, BCSH (block address area specification) is set to `0', and the block address area is set to addresses 000000H to FFFFEFH. Setting BCSH to "1" specifies the start address (using MSAR) and the address area size (using MAMR).
(iii) Example of register setting To set the block address area 64 KB from address 110000H, set the registers as follows:
MSB 76 MSAR 00 MAMR 00 5 0 0 4 1 0 3 0 0 2 0 0 1 0 0 LSB 0 1 ; set start address to 110000H 1 ; set block address area size to 64k-bytes
Memory Start Address Register MSAR correspond with address A23 to A16. A15 to A0 are set to `0'. Therefore setting MSAR to the above mentioned value specifies the start address of the block address area to address 110000H. Memory Address Mask Register MAMR set whether address A22 to 15 are compared or not. Set the register to `0' to compare, or to `1' not to compare. Remember that A23 is always compared. Setting the above-mentioned compares A23 to A16 with the values set as the start addresses. Therefore the block size is 64 KB (since the first bit set to 0 is A16 216 = 64 KB) To summarize, 64 KB of addresses 110000H to 11FFFFH are set as the block address area, and compared with the addresses on the bus. If the compared result is a match, the chip select signal CS is set to Low.
92CD54I-65
2006-01-27
TMP92CD54I
(iv) Case of overlapping blocks When the set block address area overlaps with the built-in memory area, the block address area is processed according to priorities as follows:
Built-in I/O > Built-in memory > Block address area
This means that the block address is not remapped but priorities are used to disable any conflict. Also note that any accessed areas outside the address spaces are set to 1 wait bus cycle ( CS signal is not outputted although RD and WR signal are outputted.). This factor depends on the speed of the external memory. It is a fixed parameter.
(2) Wait control
The external bus cycle completes a wait of two states at least (i.e. 100ns @fc = 20MHz). Setting the control register BCSL and specifies the number of waits in the read cycle and the write cycle. is set using the same method as for . Note that this setting is only for asynchronisation purpose.
BWW/BWR bit (BCSL Regsiter) BWW2 BWR2 0 0 1 1 0 BWW1 BWR1 0 1 0 1 1 Others BWW0 BWR0 1 0 1 0 1 Function 2states (0 wait) access fixed mode 3states (1 wait) access fixed mode (Default) 4states (2 wait) access fixed mode 5states (3 wait) access fixed mode WAIT pin input mode (Reserved)
(i) Waits number fixed mode The bus cycle is completed with the set states. The number of states is selected from 2 states (0WAIT) to 5 states (3WAIT). (ii) WAIT pin input mode This mode continuously samples the WAIT input pins and inserts a wait if the pin is active. The bus cycle is minimum 2 states and is therefore completed at 2 states when the wait signal is non active (High level). The bus cycle extends if the wait signal is active at 2 states and more.
92CD54I-66
2006-01-27
TMP92CD54I
(3) Basic bus timing *
External Read / Write Bus Cycle (0 WAIT)
T1
CLK (20MHz) CS
T2
ADDRESS
RD
read
D7 to 0 WR
input
write
D7 to 0
output
*
External Read / Write Bus Cycle (1 WAIT)
T1
CLK (20MHz) CS ADDRESS RD
TW
T2
read
D7 to 0
input
WR
write
D7 to 0
output
92CD54I-67
2006-01-27
TMP92CD54I
*
External Read / Write Bus Cycle (0 WAIT @ WAIT pin input mode)
T1
CLK (20MHz) CS
T2
ADDRESS RD
read
D7 to 0 WR
input
write
D7 to 0
output
WAIT
sampling
*
External Read / Write Bus Cycle (n WAIT @ WAIT pin input mode)
T1
CLK (20MHz) CS
TW
T2
ADDRESS RD
read
D7 to 0 WR
input
write
D7 to 0
output
WAIT
sampling
sampling
92CD54I-68
2006-01-27
TMP92CD54I
*
Example of WAIT Input Cycle (5WAIT)
FF0 D Q
FF1 D Q
FF2 D Q
FF3 D Q
FF4 D Q WAIT
CK RES CLK
CK RES
CK RES
CK RES
CK RES
CS RD WR
1
CLK(20MHz) CS RD
2
3
4
5
6
7
FF_RES
FF0_D FF0_Q
FF1_Q
FF2_Q
FF3_Q
WAIT
92CD54I-69
2006-01-27
TMP92CD54I 3.6.4 List of registers
The memory control registers and the settings are described as follows. For the addresses of the registers, see List of Special Function Registers in section 5.
(1) Control registers
The control register is a pair of BCSL and BCSH. BCSL has the same configuration regardless of the block address areas.
Block CS/WAIT control register (Low) 7 6
BWW2 0
5
BWW1 1
4
BWW0 W 0
3
-
2
BWR2 0
1
BWR1 1
0
BWR0 0
BCSL (0148H)
bit Symbol Read/Write After Reset
-
BWW[2:0] Specifies the number of write waits. 001 = 2 states (0 WAIT) access 101 = 4 states (2 WAIT) access 011 = WAIT pin input mode BWR[2:0] 001 = 2 states (0 WAIT) access 101 = 4 states (2 WAIT) access 010 = 3 states (1 WAIT) access 110 = 5 states (3 WAIT) access Others = (Reserved) 010 = 3 states (1 WAIT) access 110 = 5 states (3 WAIT) access
Specifies the number of read waits.
011 = WAIT pin input mode
Others = (Reserved)
Block CS/WAIT control register (High) 7 6
BM 0
5
0(Fix to 0)
4
W 0(Fix to 0)
3
BOM1 0
2
BOM0 0
1
BBUS1 0
0
BBUS0 0
BCSH (0149H)
bit Symbol Read/Write After reset
BE 1
BE
Enable bit
0 = No chip select signal output 1 = Chip select signal output (Default) BM Block address area specification 0 = Sets the block address area of CS to addresses 000000H to FFFFEFH. (Default) 1 = Sets the block address area of CS to programmable.
Note: After reset release, the block address area of CS is set to addresses 000000H to FFFFEFH.
BOM[1:0] 00 = SRAM or ROM(Default)
others = (Reserved)
BBUS[1:0] Sets the data bus width
00 = 8-bit (Default) others = (Reserved)
92CD54I-70
2006-01-27
TMP92CD54I
(2) Block address register A start address and an address area of the block address are specified by the memory start address register (MSAR) and the memory address mask register (MAMR). The bit to be set by the memory address mask register depends on the block address area.
Memory Start Address Register
MSAR (014BH)
7
bit Symbol Read/Write After Reset 1 MS23
6
MS22 1
5
MS21 1
4
MS20 R/W 1
3
MS19 1
2
MS18 1
1
MS17 1
0
MS16 1
MS[23:16]
Sets a start address.
Sets the start address of the block address areas. correspond to the
address A23 to A16.
Memory Address Mask Register
MAMR (014AH)
7
bit Symbol Read/Write After reset 1 MV22
6
MV21 1
5
MV20 1
4
MV19 R/W 1
3
MV18 1
2
MV17 1
1
MV16 1
0
MV15 1
MV[22:15] Enables or masks com parison of the addresses. correspond to addresses A22 to 15. If "0" is set, the comparison between the value of the address bus and the start address is enabled. If "1" is set, the comparison is masked.
92CD54I-71
2006-01-27
TMP92CD54I
3.7 8-bit Timers
TMP92CD54I features eight built-in 8-bit timers (timers 0 to 7). These timers are paired into four modules: timers 01, timers 23, timers 45, and timers 67. Each module consists of two channels and can operate in any of the following four operating modes. * * * * 8-Bit Interval Timer Mode 16-Bit Interval Timer Mode 8-Bit Programmable Square Wave Pulse Generation Output Mode (PPG - variable duty with variable cycle) 8-Bit Pulse Width Modulation Output Mode (PWM - variable duty with constant cycle)
Figure 3.7.1 to Figure 3.7.4 show block diagrams for timers 01, timers 23, timers 45 and timers 67. Each channel consists of an 8-bit up-counter, an 8-bit comparator and an 8-bit timer register. In addition, a timer flip-flop and a prescaler are provided for each pair of channels. The operation mode and timer flip-flops are controlled by five control SFRs (special-function registers). Each of the four modules (timers 01, timers 23, timers 45 and timers 67) can be operated independently. All modules operate in the same manner; hence only the operation of timers 01 is explained here.
Table 3.7.1 Registers and pins for each module Module Specification
External pin Input pin for external clock Output pin for timer flip-flop Timer run register Timer register SFR (address) Timer mode register Timer flip-flop control register
timers 01
TI0 (shared with PC0) TO1 (shared with PC1) TRUN01 (0080H) TREG0 (0082H) TREG1 (0083H) TMOD01 (0084H) TFFCR1 (0085H)
timers 23
TO3 (shared with PC2) TRUN23 (0088H) TREG2 (008AH) TREG3 (008BH) TMOD23 (008CH) TFFCR3 (008DH)
timers 45
TI4 (shared with PC3) TO5 (shared with PC4) TRUN45 (0090H) TREG4 (0092H) TREG5 (0093H) TMOD45 (0094H) TFFCR5 (0095H)
timers 67
TO7 (shared with PC5) TRUN67 (0098H) TREG6 (009AH) TREG7 (009BH) TMOD67 (009CH) TFFCR7 (009DH)
92CD54I-72
2006-01-27
3.7.1
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/Clear TRUN01 TFFCR1
Block diagrams
Prescaler clock: T0
TRUN01 Selector
(16bit interval timer mode)
Selector TRUN01 8-Bit Up-Counter (UC1) TMOD01 TMOD01 (For 8-bit PPG mode)
Timer Flip-Flop TFF1
Timer flip-flop output: TO1
External input clock: TI0 T1 T4 T16 8-bit up counter (UC0)
Over flow
2n
Over flow
T1 T16 T256
TMOD01
Figure 3.7.1 Timers 01 block diagram
TMOD01 TMOD01
92CD54I-73
8-Bit comparator (CP0) TMOD01 Match detect T0TRG 8-Bit timer register TREG0 TRUN01 Register buffer 0 Internal bus Timer 0 Interrupt output: INTT0 Timer 0 Match output: T0TRG
Match 8-Bit comparator detect (CP1)
8-Bit Timer Register TREG1
TMOD01
Internal bus
Timer 1 Interrupt output: INTT1
TMP92CD54I
2006-01-27
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/Clear TRUN23 TFFCR3
Prescaler clock: T0
TRUN23 Selector
(16bit interval timer mode)
Selector TRUN23
Timer Flip-Flop TFF3
Timer flip-flop output: TO3
T1 T4 T16 8-bit up counter (UC2)
Over flow
2n
Over flow
T1 T16 T256 8-Bit Up-Counter (UC3) TMOD23 TMOD23 (For 8-bit PPG mode)
TMOD23
Figure 3.7.2 Timers 23 block diagram
TMOD23 TMOD23
92CD54I-74
8-Bit comparator (CP2) TMOD23 Match detect T2TRG 8-Bit timer register TREG2 TRUN23 Register buffer 2 Internal bus Timer 2 Interrupt output: INTT2 Timer 2 Match output: T0TRG
Match 8-Bit comparator detect (CP3)
8-Bit Timer Register TREG3
TMOD23
Internal bus
Timer 3 Interrupt output: INTT3
TMP92CD54I
2006-01-27
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/Clear TRUN45 TFFCR5
Prescaler clock: T0
TRUN45 Selector
(16bit interval timer mode)
Selector TRUN45 8-Bit Up-Counter (UC5) TMOD45 TMOD45 (For 8-bit PPG mode)
Timer Flip-Flop TFF5
Timer flip-flop output: TO5
External input clock: TI4 T1 T4 T16 8-bit up counter (UC4)
Over flow
2n
Over flow
T1 T16 T256
TMOD45
Figure 3.7.3 Timers 45 block diagram
TMOD45 TMOD45
92CD54I-75
8-Bit comparator (CP4) TMOD45 Match detect T4TRG 8-Bit timer register TREG4 TRUN45 Register buffer 4 Internal bus Timer 4 Interrupt output: INTT4 Timer 4 Match output: T4TRG
Match 8-Bit comparator detect (CP5)
8-Bit Timer Register TREG5
TMOD45
Internal bus
Timer 5 Interrupt output: INTT5
TMP92CD54I
2006-01-27
Prescaler 2 T1 T4 T16 T256 4 8 16 32 64 128 256 512 Run/Clear TRUN67 TFFCR7
Prescaler clock: T0
TRUN67 Selector
(16bit interval timer mode)
Selector TRUN67
Timer Flip-Flop TFF7
Timer flip-flop output: TO7
T1 T4 T16 8-bit up counter (UC6)
Over flow
2n
Over flow
T1 T16 T256 8-Bit Up-Counter (UC7) TMOD67 TMOD67 (For 8-bit PPG mode)
TMOD67
Figure 3.7.4 Timers 67 block diagram
TMOD67 TMOD67
92CD54I-76
8-Bit comparator (CP6) TMOD67 Match detect T6TRG 8-Bit timer register TREG6 TRUN67 Register buffer 6 Internal bus Timer 6 Interrupt output: INTT6 Timer 6 Match output: T6TRG
Match 8-Bit comparator detect (CP7)
8-Bit Timer Register TREG7
TMOD67
Internal bus
Timer 1 Interrup7 output: INTT7
TMP92CD54I
2006-01-27
TMP92CD54I 3.7.2 Operation of each circuit
(1) Prescalers A 9-bit prescaler generates the input clock to timers 01. The clock T0 is the CPU clock fc divided by 4 and is the input to this prescaler. The prescaler's operation can be controlled using TRUN01 in the timer control register. Setting to 1 starts the count; setting to 0 clears the prescaler to zero and stops operation. At fc=20MHz Output clock T1 (8/fc) Note: The following number in the parenthesis indicates the frequency when TMP92CD54I operates is the maximum frequency.
X1 X2 (10MHz) O (10MHz) S C CPU clock fc (20MHz) x4 /2 T0 T1 T2 T4 T8 T16 T32 T256
Interval 400 ns 1.6 s 6.4 s 102.4 s
T4 (32/fc) T16 (128/fc) T256 (2048/fc)
0 /4
1
2
3
4
5
6
7
8
9-bit prescaler
/2
fIO (internal I/O clock)
run/stop & clear TRUN01
.
4/fc
T1
T4
Figure 3.7.5 Prescaler
92CD54I-77
2006-01-27
TMP92CD54I
(2) Up-counters (UC0 and UC1) These are 8-bit binary counters which count up the input clock pulses for the clock specified by TMOD01. The input clock for UC0 is selectable and can be either the external clock input via the TI0 pin or one of the three internal clocks T1, T4 or T16. The clock setting is specified by the value set in TMOD01. The input clock for UC1 depends on the operation mode. In 16-Bit Interval Timer Mode, the overflow output from UC0 is used as the input clock. In any mode other than 16-Bit Interval Timer Mode, the input clock is selectable and can either be one of the internal clocks T1, T16 or T256, or the comparator output (the match detection signal) from timer 0. For each interval timer the timer operation control register bits TRUN01 and TRUN01 can be used to stop and clear the up-counters and to control their count. A Reset clears both up-counters, stopping the timers.
92CD54I-78
2006-01-27
TMP92CD54I
(3) Timer registers (TREG0 and TREG1) These are 8-bit registers which can be used to set a time interval. When the value set in the timer register TREG0 or TREG1 matches the value in the corresponding up-counter, the Comparator Match Detect signal goes Active. If the value set in the timer register is 00H, the signal goes Active when the up-counter overflows. The TREG0 are double buffer structure, each of which makes a pair with register buffer. The setting of the bit TRUN01 determines whether TREG0's double buffer structure is enabled or disabled. It is disabled if = 0 and enabled if = 1. When the double buffer is enabled, data is transferred from the register buffer to the timer register when a 2n overflow occurs in PWM Mode, or at the start of the PPG cycle in PPG Mode. Hence the double buffer cannot be used in Interval Timer Mode. A Reset initializes to 0, disabling the double buffer. To use the double buffer, write data to the timer register, set to 1, and write the following data to the register buffer. Figure 3.7.6 shows the configuration of TREG0.
Up-counter
Comparator (CP0)
Timer Registers 0 (TREG0) B Selector S Register Buffers 0 Write TRUN01 A Matching detection in PPG cycle 2n overflow of PWM Write to TREG0
Shift trigger
Internal bus
Figure 3.7.6 Configuration of TREG0 Note: The same memory address is allocated to the timer register and the register buffer. When = 0, the data is written in both registers (i.e. the Register buffer 0 and the 8-bit timer register TREG0) at the same time; when = 1, only the register buffer is written to. The address of each timer register is as follows. TREG0: 000082H TREG2: 00008AH TREG4: 000092H TREG6: 00009AH TREG1: 000083H TREG3: 00008BH TREG5: 000093H TREG7: 00009BH
All these registers are write-only and cannot be read.
92CD54I-79
2006-01-27
TMP92CD54I
(4) Comparator (CP0) The comparator compares the value in an up-counter with the value set in a timer register. If they match, the up-counter is cleared to zero and an interrupt signal (INTT0 or INTT1) is generated. If timer flip-flop inversion is enabled, the timer flip-flop is inverted at the same time. (5) Timer flip-flop (TFF1) The timer flip-flop (TFF1) is a flip-flop inverted by the match detect signal (8-bit comparator output) of each interval timer. Whether inversion is enabled or disabled is determined by the setting of the bit TFFCR1 in the Timer Flip-Flop Control Register. A Reset clears the value of TFF1 to 0. Writing 01 or 10 to TFFCR1 sets TFF1 to 0 or 1. Writing 00 to these bits inverts the value of TFF1 (this is known as software inversion). The TFF1 signal is output via the TO1 pin (which can also be used as PC1). When this pin is used as the timer output, the timer flip-flop should be set beforehand using the Port C Function Register PCFC. TFF is inverted by .... 8-bit interval timer mode 16-bit interval timer mode 8-bit PWM mode 8-bit PPG mode : UC0 matches TREG0. Or when UC1 matches TREG1. (Either one of the two is chosen) : UC0 matches TREG0 and UC1 matches TREG1. : UC0 matches TREG0 or 2n overflow is occurred. : UC0 matches TREG0 or UC0 matches TREG1.
Note:
When the double buffer is enabled for an 8-bit timer in PWM or PPG mode, caution is required as explained below. If new data is written to the register buffer immediately before an overflow occurs by a match between the timer register value and the up-counter value, the timer flip-flop may output an unexpected value. For this reason, make sure that in PWM mode new data is written to the register buffer by six cycles (fc x 6) before the next overflow occurs by using an overflow interrupt. In the case of using PPG mode, make sure that new data is written to the register buffer by six cycles before the next cycle compare match occurs by using a cycle compare match interrupt.
Example when using PWM mode:
TREG0 and UC0 match 2 overflow interrupt
n
TO1
tPWM (PWM cycle)
Desired PWM cycle change point Write new data to the register buffer before the next overflow occurs by using an overflow interrupt
92CD54I-80
2006-01-27
TMP92CD54I 3.7.3 SFRs
Timers 01 Run Register
7
TRUN01 (0080H) Bit symbol Read/Write After Reset T0RDE R/W 0 Double buffer 0: Disable 1: Enable
6
-
5
-
4
-
3
I2T01 0
2
T01PRUN
1
T1RUN 0 R/W
0
T0RUN 0
0
Function
IDLE2 Timer Run/Stop control 0: Stop 0: Stop & Clear 1: Operate 1: Run (count up)
TREG0 double buffer control 0 1 Disable Enable
Timer Run/Stop control 0 1 Stop & Clear Run (count up)
I2T01: Operation in IDLE2 Mode T01PRUN: Run prescaler T1RUN: Run Timer 1 T0RUN: Run Timer 0
Note1: The values of bits 4 to 6 of TRUN01 are undefined when read. Note2: Needs to set bit and enable double buffer in PPG/PWM mode.
Timers 23 Run Register
7
TRUN23 (0088H) Bit symbol Read/Write After Reset T2RDE R/W 0 Double buffer 0: Disable 1: Enable
6
-
5
-
4
-
3
I2T23 0 IDLE2 0: Stop 1: Rung
2
T23PRUN
1
T3RUN 0 R/W
0
T2RUN 0
0
Function
Timer Run/Stop control 0: Stop & Clear 1: Run (count up)
TREG2 double buffer control 0 1 Disable Enable
Timer Run/Stop control 0 1 Stop & Clear Run (count up)
I2T23: Operation in IDLE2 Mode T23PRUN: Run prescaler T3RUN: Run Timer 3 T2RUN: Run Timer 2
Note1: The values of bits 4 to 6 of TRUN23 are undefined when read. Note2: Needs to set bit and enable double buffer in PPG/PWM mode. Figure 3.7.7 Register for 8-bit Timers
92CD54I-81
2006-01-27
TMP92CD54I
Timers 45 Run Register
7
TRUN45 (0090H) Bit symbol Read/Write After Reset T4RDE R/W 0 Double buffer 0: Disable 1: Enable
6
-
5
-
4
-
3
I2T45 0
2
T45PRUN
1
T5RUN 0 R/W
0
T4RUN 0
0
Function
IDLE2 Timer Run/Stop control 0: Stop 0: Stop & Clear 1: Operate 1: Run (count up)
TREG4 double buffer control 0 1 Disable Enable
Timer Run/Stop control 0 1 Stop & Clear Run (count up)
I2T45: Operation during IDLE2-Mode T45PRUN: Run for prescaler T5RUN: Run Timer 5 T4RUN: Run Timer 4
Note1: The values of bits 4 to 6 of TRUN45 are undefined when read. Note2: Needs to set bit and enable double buffer in PPG/PWM mode.
Timers 67 Run Register
7
TRUN67 (0098H) Bit symbol Read/Write After Reset T6RDE R/W 0 Double buffer 0: Disable 1: Enable
6
-
5
-
4
-
3
I2T67 0
2
T67PRUN
1
T7RUN 0 R/W
0
T6RUN 0
0
Function
IDLE2 Timer Run/Stop control 0: Stop 0: Stop & Clear 1: Operate 1: Run (count up)
TREG6 double buffer control 0 1 Disable Enalbe
Timer Run/Stop control 0 1 Stop & Clear Run (count up)
I2T67: Operation during IDLE2 Mode T67PRUN: Run prescaler T7RUN: Run Timer 7 T6RUN: Run Timer 6
Note1: The values of bits 4 to 6 of TRUN67 are undefined when read. Note2: Needs to set bit and enable double buffer in PPG/PWM mode.
Figure 3.7.8 Register for 8-bit Timers
92CD54I-82
2006-01-27
TMP92CD54I
Timers 01 Mode Register
7
TMOD01 (0084H) Bit symbol Read/Write After Reset 0 T01M1
6
T01M0 0
5
PWM01 0 PWM cycle 00: reserved 01: 26 10: 27 11: 28
4
PWM00 0 R/W
3
T1CLK1 0 00: T0TRG 01: T1 10: T16 11: T256
2
T1CLK0 0
1
T0CLK1 0
0
T0CLK0 0
Function
Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
Source clock for Timer 1
Source clock for Timer 0
00: TI0 pin (Note) 01: T1 10: T4 11: T16
Timer 0 source clock selection 00 01 10 11 TI0 (external input) T1 (prescaler) T4 (prescaler) T16 (prescaler)
Timer 1 source clock selection
TMOD01 01 TMOD01 =01
00 01 10 11
Comparator output from Timer 0
Overflow output from Timer 0
T1 T16 T256
(16-Bit Timer Mode)
PWM cycle selection 00 01 10 11 reserved 26 x clock source 27 x clock source 28 x clock source
Timers 01 operation mode selection 00 01 10 11 Note : When setting the TI0 pin, first set the Port C setting, then TMOD01. Two 8-bit timers 16-bit timer 8-bit PPG 8-bit PWM (Timer 0) + 8-bit timer (Timer 1)
Figure 3.7.9 Register for 8-bit Timers
92CD54I-83
2006-01-27
TMP92CD54I
Timers 23 Mode Register
7
TMOD23 (008CH) Bit Symbol Read/Write After Reset 0 T23M1
6
T23M0 0
5
PWM21 0 PWM cycle 00: reserved 01: 26 10: 27 11: 28
4
PWM20 0 R/W
3
T3CLK1 0 00: T2TRG 01: T1 10: T16 11: T256
2
T3CLK0 0
1
T2CLK1 0 00: reserved 01: T1 10: T4 11: T16
0
T2CLK0 0
Function
Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
Source clock for Timer 3
Source clock for Timer 2
Timer 2 source clock selection 00 01 10 11 Do not set T1 (prescaler) T4 (prescaler) T16 (prescaler)
Timer 3 source clock selection
TMOD23 01 TMOD23 =01
00 01 10 11
Comparator output from Timer 2 T1 T16 T256
Overflow output from Timer 2
(16-Bit Timer Mode)
PWM cycle selection 00 01 10 11 reserved 26 x clock source 27 x clock source 28 x clock source
Timers 23 operation mode selection 00 01 10 11 Two 8-bit timers 16-bit timer 8-bit PPG 8-bit PWM (Timer 2) + 8-bit timer (Timer 3)
Figure 3.7.10 Register for 8-bit Timers
92CD54I-84
2006-01-27
TMP92CD54I
Timers 45 Mode Register
7
TMOD45 (0094H) Bit symbol Read/Write After Reset 0 T45M1
6
T45M0 0
5
PWM41 0 PWM cycle 00: reserved 01: 26 10: 27 11: 28
4
PWM40 0 R/W
3
T5CLK1 0 00: T4TRG 01: T1 10: T16 11: T256
2
T5CLK0 0
1
T4CLK1 0
0
T4CLK0 0
Function
Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
Source clock for Timer 5
Source clock for Timer 4
00: TI4 pin (Note) 01: T1 10: T4 11: T16
Source clock for Timer 4 00 01 10 11 TI4 (external input) T1 (prescaler) T4 (prescaler) T16 (prescaler)
Source clock for Timer 5
TMOD45 01 TMOD45 =01
00 01 10 11
Comparator output from Timer 4 T1 T16 T256
Overflow output from Timer 4
(16-Bit Timer Mode)
PWM cycle 00 01 10 11 reserved 26 x clock source 27 x clock source 28 x clock source
Operation mode for Timers 45 00 01 10 11 Note : When setting the TI4 pin, first set the Port C setting, then TMOD45. Two 8-bit timers 16-bit timer 8-bit PPG 8-bit PWM (Timer 4) + 8-bit timer (Timer 5)
Figure 3.7.11 Register for 8-bit Timers
92CD54I-85
2006-01-27
TMP92CD54I
Timers 67 Mode register
7
TMOD67 (009CH) Bit symbol Read/Write After Reset 0 T67M1
6
T67M0 0
5
PWM61 0 PWM cycle 00: reserved 01: 26 10: 27 11: 28
4
PWM60 0 R/W
3
T7CLK1 0 00: T6TRG 01: T1 10: T16 11: T256
2
T7CLK0 0
1
T6CLK1 0 00: reserved 01: T1 10: T4 11: T16
0
T6CLK0 0
Function
Operation mode 00: 8-Bit Timer Mode 01: 16-Bit Timer Mode 10: 8-Bit PPG Mode 11: 8-Bit PWM Mode
Source clock for Timer 7
Source clock for Timer6
Source clock for Timer 6 00 01 10 11 Do not set T1 (prescaler) T4 (prescaler) T16 (prescaler)
Source clock for Timer 7
TMOD67 01 TMOD67 =01
00 01 10 11
Comparator output from Timer 6 T1 T16 T256
Overflow output from Timer 6
(16-Bit Timer Mode
PWM cycle 00 01 10 11 reserved 26 x clock source 27 x clock source 28 x clock source
Operation mode for Timers 67 00 01 10 11 Two 8-bit timers 16-bit timer 8-bit PPG 8-bit PWM (Timer 6) + 8-bit timer (Timer 7)
Figure 3.7.12 Register for 8-bit Timers
92CD54I-86
2006-01-27
TMP92CD54I
Timer 1 Flip-Flop Control Register
7
TFFCR1 (0085H) Bit symbol Read/Write After Reset -
6
-
5
-
4
-
3
TFF1C1 1 00: Invert TFF1 01: Set TFF1
2
TFF1C0 R/W 1
1
TFF1IE 0 TFF1
0
TFF1IS 0
Read-Modify -Write instructions are prohibited.
TFF1 Control for Inversion inversion 0: Disable 1: Enable select 0: Timer 0 1: Timer 1
Function
10: Clear TFF1 11: Don't care
Inverse signal for Timer Flop-Flop 1 (TFF1) (Don't care except in 8-Bit Timer Mode) 0 1 Inversion by Timer 0 Inversion by Timer 1
Inversion of TFF1 0 1 Disabled Enabled
Control of TFF1 00 Inverts the value of TFF1 01 10 Note: The values of bits 4 to 7 of TFFCR1 are undefined when read. 11 Sets TFF1 to 1 Clears TFF1 to 0 Don't care
Figure 3.7.13 Register for 8-bit Timers
92CD54I-87
2006-01-27
TMP92CD54I
Timer 3 Flip-Flop Control Register
7
TFFCR3 (008DH) Bit symbol Read/Write After Reset -
6
-
5
-
4
-
3
TFF3C1 1 00: Invert TFF3 01: Set TFF3
2
TFF3C0 R/W 1
1
TFF3IE 0
0
TFF3IS 0
TFF3 TFF3 Control for Inversion inversion 0: Disable 1: Enable select 0: Timer 2 1: Timer 3
Read-Modify -Write instructions are prohibited.
Function
10: Clear TFF3 11: Don't care
Inverse signal for Timer Flip-Flop 3 (TFF3) (Don't care except in 8-Bit Timer Mode) 0 1 Inversion by Timer 2 Inversion by Timer 3
Inversion of TFF3 0 1 Disabled Enabled
Control of TFF3 00 01 10 Note: The values of bits 4 to 7 of TFFCR3 are undefined when read. 11 Inverts the value of TFF3 Sets TFF3 to 1 Clears TFF3 to 0 Don't care
Figure 3.7.14 Register for 8-bit Timers
92CD54I-88
2006-01-27
TMP92CD54I
Timer 5 Flip-Flop Control Register
7
TFFCR5 (0095H) Bit symbol Read/Write After Reset -
6
-
5
-
4
-
3
TFF5C1 1 00: Invert TFF5 01: Set TFF5
2
TFF5C0 R/W 1
1
TFF5IE 0
0
TFF5IS 0
TFF5 TFF5 Control for Inversion inversion 0: Disable 1: Enable select 0: Timer 4 1: Timer 5
Read-Modify -Write instructions are prohibited.
Function
10: Clear TFF5 11: Don't care
Inverse signal for Timer Flip-Flop 5 (TFF5) (Don't care except in 8-Bit Timer Mode) 0 1 Inversion by Timer 4 Inversion by Timer 5
Inversion of TFF5 0 1 Disabled Enabled
Control of TFF5 00 01 10 Note: The values of bits 4 to 7 of TFFCR5 are undefined when read. 11 Inverts the value TFF5 Sets TFF5 to 1 Clears TFF5 to 0 Don't care
Figure 3.7.15 Register for 8-bit Timers
92CD54I-89
2006-01-27
TMP92CD54I
Timer 7 Flip-Flop Control Register
7
TFFCR7 (009DH) Bit symbol Read/Write After Reset -
6
-
5
-
4
-
3
TFF7C1 1 00: Invert TFF7 01: Set TFF7
2
TFF7C0 R/W 1
1
TFF7IE 0
0
TFF7IS 0
TFF7 TFF7 Control for Inversion invertsion 0: Disable 1: Enable select 0: Timer 6 1: Timer 7
Read-Modify -Write instructions are prohibited.
Function
10: Clear TFF7 11: Don't care
Inverse signal for Timer Flip-Flop 7 (TFF7) (Don't care except in 8-Bit Timer Mode) 0 1 Inversion by Timer 6 Inversion by Timer 7
Inversion of TFF7 0 1 Disabled Enabled
Control of TFF7 00 01 10 Note: The values of bits 4 to 7 of TFFCR7 are undefined when read. 11 Inverts the value of TFF7 Sets TFF7 to 1 Clears TFF7 to 0 Don't care
Figure 3.7.16 Register for 8-bit Timers
92CD54I-90
2006-01-27
TMP92CD54I
Timer Register (TREG 0 to 7)
Symbol
TREG0
Address
82H (no RMW) 83H (no RMW) 8AH (no RMW) 8BH (no RMW) 92H (no RMW) 93H (no RMW) 9AH (no RMW) 9BH (no RMW)
7
6
5
4
3
2
1
0
TREG1
TREG2
TREG3
TREG4
TREG5
TREG6
TREG7
W Undefined W Undefined W Undefined W Undefined W Undefined W Undefined W Undefined W Undefined
TREG is for the comparator (When UC matches TREG, occur match detect signal). Refer to setting example in Section 3.7.4, Operation in each mode.
Figure 3.7.17 Register for 8-bit Timers
92CD54I-91
2006-01-27
TMP92CD54I 3.7.4 Operation in each mode
(1) 8-Bit interval Timer Mode Both timer 0 and timer 1 can be used independently as 8-bit interval timers. Generating interrupts at a fixed interval (using timer 1) To generate interrupts at constant intervals using timer 1 (INTT1), first stop timer 1 then set the operation mode, input clock and a cycle to TMOD01 and TREG1 register, respectively. Then, enable the interrupt INTT1 and start timer 1 counting.
Example: To generate an INTT1 interrupt every 40 seconds at fc = 20 MHz, set each register as follows:
MSB 7 - 0 LSB 0 - -
TRUN01 TMOD01 TREG1 INTET01 TRUN01
6 X 0
5 X X
4 X X
3 - 0
2 - 1
1 0 -

0 X -
1 1 X
1 0 X
0 1 X
0 - -
1 - 1
0 - 1
0 - -
Stop timer 1 and clear it to 0. Select 8-Bit Interval Timer Mode and select T1 (0.4 s at fc = 20 MHz) as the input clock. Set TREG1 to 40 s / T1 = 100 = 64H Set INTT1 interrupt level to 5. Start timer 1 counting.
Note: X = Don't care; "-" = No change
TREG1 = 64H = 40 s / T1 UC1 & TREG1 Match detect INTT1 interrupt request occur
Select the input clock using Table 3.7.2.
Table 3.7.2 Selecting Interrupt Interval and the Input Clock Using 8-Bit Timer Input Clock T1 (8/fc) T4 (32/fc) T16 (128/fc) T256 (2048/fc) Interrupt Interval (at fc = 20 MHz) 0.4 s to 102.4 s 1.6 s to 409.6 s 6.4 s to 1.639 ms 102.4 s to 26.22 ms Resolution 0.4 s 1.6 s 6.4 s 102.4 s
Note: The input clocks for timer 0 and timer 1 differ as follows: timer 0: Uses timer 0 input (TI0) and can be selected from T1, T4 or T16 timer 1: Match output of timer 0 (T0TRG) and can be selected from T1, T16, T256
92CD54I-92
2006-01-27
TMP92CD54I
Generating a 50% duty ratio square wave pulse The state of the timer flip-flop (TFF1) is inverted at constant intervals and its status output via the timer output pin (TO1). Example: To output a 2.4-s square wave pulse from the TO1 pin at fc = 20 MHz, use the following procedure to make the appropriate register settings. This example uses timer 1; however, either timer 0 or timer 1 may be used.
7 - 0 6 X 0 5 X X 4 X X 3 - 0 2 - 1 1 0 - 0 - -
TRUN01 TMOD01 TREG1 TFFCR1 PCCR PCFC TRUN01

Stop timer 1 and clear it to 0. Select 8-Bit Interval Timer Mode and select T1 (0.4 s at fc = 20 MHz) as the input clock. Set the timer register to 2.4 s / T1 / 2 = 3 Clear TFF1 to 0 and set it to invert on the match detect signal from timer 1. Set PC1 to function as the TO1 pin. Start timer 1 counting.
0 X X X -
0 X X X X
0 X - - X
0 X - - X
0 1 - -
0 0 - - 1
1 1 1 1 1
1 1 - -
Note: X = Don't care; "-" = No change
T1
TRUN01 Bit72 Upcounter Bit 1 Bit 0 Comparator timing Comparator output (match detect) INTT1 UC1 Clear
0
1
2
3
0
1
2
3
0
1
2
3
0
TFF1
TO1
0.77 s at @fc = 20
Figure 3.7.18 Square wave output timing chart (50% Duty)
92CD54I-93
2006-01-27
TMP92CD54I
Making timer 1 count up on the match signal from the timer 0 comparator Select 8-Bit Interval Timer Mode and set the comparator output from timer 0 to be the input clock to timer 1.
Comparator output (timer 0 match) timer 0 up-counter (when TREG0 = 5) timer 1 up-counter (when TREG1 = 2) timer 1 match output 1 2 3 1 4 5 1 2 3 2 4 5 1 2 1 3
Figure 3.7.19 Timer 1 Count Up on Signal from Timer 0 (2) 16-Bit interval Timer Mode A 16-bit interval timer is configured by pairing the two 8-bit timers timer 0 and timer 1. To make a 16-bit interval timer in which timer 0 and timer 1 are cascaded together, set TMOD01 to 01. In 16-Bit Interval Timer Mode, the overflow output from timer 0 is used as the input clock for timer 1, regardless of the value set in TMOD01. Table 3.7 4(1) shows the relationship between the timer (interrupt) cycle and the input clock selection. To set the timer interrupt interval, set the lower eight bits in timer register TREG0 and the upper eight bits in TREG1. Be sure to set TREG0 first (as entering data in TREG0 temporarily disables the compare, while entering data in TREG1 starts the compare).
TRUN01 Selector
T1 T4 T16
TFFCR1 Clear Inversion TFF1 TO1
Clear Overflow 8-bit up-counter (UC0)
8-bit up-counter (UC1)
TMOD01 Comparator Comparator
TREG0 INTT1
Register Buffer
TREG1
Internal bus
Figure 3.7.19 Block diagram of 16-Bit interval timer Mode
92CD54I-94
2006-01-27
TMP92CD54I
Setting example: To generate an INTT1 interrupt every 0.4 seconds at fc = 20 MHz, set the timer registers TREG0 and TREG1 as follows: If T16 (6.4 s at 20 MHz) is used as the input clock for counting, set the following value in the registers: 0.4 s / 6.4 s = 62500 = F424H; i.e. set TREG1 to F4H and TREG0 to 24H. The comparator match signal is output from timer 0 each time the up-counter UC0 matches TREG0, where the up-counter UC0 is not cleared. In the case of the timer 1 comparator, the match detect signal is output on each comparator pulse on which the values in the up-counter UC1 and TREG1 match. When the match detect signal is output simultaneously from both the comparators timer 0 and timer 1, the up-counters UC0 and UC1 are cleared to 0 and the interrupt INTT1 is generated. Also, if inversion is enabled, the value of the timer flip-flop TFF1 is inverted.
Example: When TREG1 = 04H and TREG0 = 80H
Value of up-counter(UC1, UC0): 0000H UC0 & TREG0 match detect signal UC1 & TREG1 match detect signal Interrupt INTT1 Timer output TO1 Inversion 0080H 0180H 0280H 0380H 0480H
Figure 3.7.20 Timer output by 16-Bit Interval Timer Mode (3) 8-Bit Programmable Pulse Generation(PPG) Output Mode Square wave pulses can be generated at any frequency and duty ratio by timer 0. The output pulses may be active-Low or active-High. In this mode timer 1 cannot be used. Timer 0 outputs pulses on the TO1 pin (which can also be used as PC1).
tH tL
t TREG0 and UC0 match (Interrupt INTT0) TREG1 and UC0 match (Interruput INTT1) TO1
Duty cycle
TREG0
TREG1
Period
Figure 3.7.21 8 bit PPG output waveforms
92CD54I-95
2006-01-27
TMP92CD54I
In this mode a programmable square wave is generated by inverting the timer output each time the 8-bit up-counter (UC0) matches the value in one of the timer registers TREG0 or TREG1. The value set in TREG0 must be smaller than the value set in TREG1. Although the up-counter for timer 1 (UC1) is not used in this mode, TRUN01 should be set to 1 (To enable the comparator to compare with TREG1) so that UC1 is set for counting. Figure 3.7.22 shows a block diagram representing this mode.
TO1 Selector
T1 T4 T16
TRUN01 8-bit up-counter (UC0) TFF1 TFFCR1
Inversion TMOD01 INTT0 Comparator INTT1
Comparator
Selector TREG0-WR
TREG0 Shift trigger
Register Buffer
TREG1
TRUN01
Internal bus
Figure 3.7.22 Block diagram of 8-Bit PPG Output Mode If the TREG0 double buffer is enabled in this mode, the value of the register buffer will be shifted into TREG0 each time TREG1 matches UC0. Use of the double buffer facilitates the handling of low-duty waves (when duty is varied).
Match with TREG0 and up-Counter Match with TREG1 TREG0 (Value to be compared) Register buffer
(Up-counter = Q1)
(Up-countner = Q2) Shift from register buffer Q2 Q2 Q3 TREG0 (register buffer) write
Q1
Figure 3.7.23 Operation of register buffer
92CD54I-96
2006-01-27
TMP92CD54I
Example: To generate 1/4-duty 62.5 kHz pulses (at fc = 20 MHz):
16 s
Calculate the value which should be set in the timer register. To obtain a frequency of 62.5 kHz, the pulse cycle t should be: t = 1/62.5 kHz = 16 s T1 = 0.4 s (at 20 MHz); 16 s / 0.4 s = 40 Therefore set TREG1 to 40 (28H) The duty is to be set to 1/4: t x 1/4 = 16 s x 1/4 = 4 s 4 s / 0.4 s = 10 Therefore, set TREG0 = 10 = 0AH.
7 0 1 0 0 X 6 X 0 0 0 X 5 X X 0 1 X 4 X X 0 0 X 3 - X 1 1 0 2 0 X 0 0 1 1 0 0 1 0 1 0 0 1 0 0 X
TRUN01 TMOD01 TREG0 TREG1 TFFCR1 PCCR PCFC TRUN01

Stop timer 0 and timer 1 and clear it to "0". Set the 8-bit PPG mode, and select T1 as input clock. Write 0AH Write 28H Set TFF1 and enable inversion.
10 generates a negative logic pulse.
X X 1 X X X - - X - - X - - - - 1 1 1 1 - 1
Set PC1 as the TO1 pin. Set double buffer enable, and start timer 0 and timer 1 counting.
Note: X = Don't care; "-" = No change
92CD54I-97
2006-01-27
TMP92CD54I
(4) 8-Bit Pulse with Modulation ( PWM ) Output Mode This mode is only valid for timer 0. In this mode, a PWM pulse with the maximum resolution of 8 bits can be output. When timer 0 is used the PWM pulse is output on the TO1 pin (which is also used as PC1). Timer 1 can also be used as an 8-bit timer. The timer output is inverted when the up-counter (UC0) matches the value set in the timer register TREG0 or when 2n counter overflow occurs (n = 6, 7 or 8 as specified by TMOD01). The up-counter UC0 is cleared when 2n counter overflow occurs. The following conditions must be satisfied before this PWM mode can be used. Value set in TREG0 < value set for 2n counter overflow Value set in TREG0 0
TREG0 and UC0 match 2n overflow (INTT0 interrupt) TO1 tPWM (PWM cycle)
Figure 3.7.24 8-bit PWM waveforms Figure 3.7.25 shows a block diagram representing this mode.
TRUN01
T1 T4 T16
TO1 TFFCR1
Selector
8-bit up counter (UC0)
Clear 2
n
TAFF1 TMOD01 Invert
TMOD01
overflow control Comparator
Overflow
INTT0 TREG0
Selector
Shift trigger Register buffer
TREG0-WR TRUN01 Internal bus
Figure 3.7.25 Block diagram of 8-Bit PWM Mode
92CD54I-98
2006-01-27
TMP92CD54I
In this mode the value of the register buffer will be shifted into TREG0 if 2n overflow is detected when the TREG0 double buffer is enabled. Use of the double buffer facilitates the handling of low duty ratio waves.
Match with TREG0 Up-counter = Q1 2n overflow TREG0 (value to be compared) Register buffer Q1 Q2 Shift into TREG0 Q2 Q3 TREG0 (register buffer) write Up-counter = Q2
Figure 3.7.26 Register buffer operation
Example: To output the following PWM waves on the TO1 pin at fc = 20 MHz:
36.0 s 51.2 s
To achieve a 51.2-s PWM cycle by setting T1 to 0.4 s (at fc = 20 MHz): 51.2 s / 0.4 s = 128 2n = 128 Therefore n should be set to 7. Since the low-level period is 36.0 s when T1 = 0.4 s, set the following value for TREG0: 36.0 s / 0.4 s = 90 = 5AH
MSB 7 - 1 LSB 0 0 1
TRUN01 TMOD01 TREG0 TFFCR1 PCCR PCFC TRUN01
6 X 1
5 X 1
4 X 0
3 - -
2 - -
1 - 0
Stop timer 0 and clear it to 0. Select 8-Bit PWM Mode (cycle: 27) and select T1 as the input clock. Write 5AH. Clear TFF1 to 0, and enable the inversion.
0 X X X 1
1 X X X X
0 X - - X
1 X - - X
1 1 - -
0 0 - - 1
1 1 1 1 -
0 X - 1
Set PC1 and the TO1 pin. Set double buffer enable, and start timer 0 counting.
Note: X = Don't care; "-" = No change
92CD54I-99
2006-01-27
TMP92CD54I
Table 3.7.3 PWM cycle
PWM Interval (at fc = 20MHz) T1 26 27 28 25.6 s ( 39.06 kHz ) 51.3 s ( 19.53 kHz ) 102.4 s ( 9.77 kHz ) T4 102.4 s ( 9.77 kHz ) 204.8 s ( 4.88 kHz ) 409.6 s ( 2.44 kHz ) T16 409.6 s ( 2.44 kHz ) 819.2 s ( 1.22 kHz ) 1.6384 ms ( 0.61 kHz )
(5) Settings for each mode Table 3.7.4 shows the SFR settings for each mode. Table 3.7.4 Interval Timer mode setting registers
Register name Function Interval Timer mode TMOD01 PWM cycle Upper timer input clock Lower timer input clock TFFCR1 Timer F/F invert signal select 0: Lower timer output 1: Upper timer output
8-bit timer x 2 channels
00
-
Lower timer match, External clock, T1, T16, T256 T1, T4, T16 (00, 01, 10, 11) (00, 01, 10, 11) External clock, T1, T4, T16 (00, 01, 10, 11) External clock, T1, T4, T16 (00, 01, 10, 11) External clock, - T1, T16 , T256 (01, 10, 11) T1, T4, T16 (00, 01, 10, 11) -
16-bit interval timer mode
01
-
-
-
8-bit PPG x 1 channel
10
-
-
-
8-bit PWM x 1 channel
11
26 , 27 , 28 (01, 10, 11) -
-
8-bit timer x 1 channel
11
Output disabled
Note:"-" = Don't care
92CD54I-100
2006-01-27
TMP92CD54I
3.8 16-Bit Timer/Event Counters
TMP92CD54I incorporates two multifunctional 16-bit timer/event counters (timer 8 and timer A) which have the following operation modes: * 16-Bit Interval Timer Mode * 16-Bit Event Counter Mode * 16-Bit Programmable Pulse Generation (PPG) Mode Can be used following operation modes by capture function: * * * Frequency Measurement Mode Pulse Width Measurement Mode Time Differential Measurement Mode Figure 3.8.1 to Figure 3.8.2 show block diagrams for timer 8 and timer A. Each timer/event counter channel consists of a 16-bit up-counter, two 16-bit timer registers (one of them with a double-buffer structure), two 16-bit capture registers, two comparators, a capture input controller, a timer flip-flop and a control circuit. Each timer/event counter is controlled by an 11-byte control SFR. The two channels (timer 8 and timer A) can be used independently. Both channels feature the same operations except for those described in Table 3.8.1. Thus, only the operation of timer 8 is explained below. Table 3.8.1 Differences between Timer 8 and Timer A Channel Specification
External Pins External clock / Capture trigger input pins Timer flip-flop output pins Timer Run Register Timer Mode Register Timer Flip-Flop Control Register SFR (address)
Timer 8
TI8 (also used as PD0) TI9 (also used as PD1) TO8 (also used as PD2) TO9 (also used as PD3) TRUN8 (00A0H) TMOD8 (00A2H) TFFCR8 (00A3H) TREG8L (00A8H)
Timer A
TIA (also used as PD4) TIB (also used as PD5) TOA (also used as PD6) TOB (also used as PD7) TRUNA (00B0H) TMODA (00B2H) TFFCRA (00B3H) TREGAL (00B8H) TREGAH (00B9H) TREGBL (00BAH) TREGBH (00BBH) CAPAL (00BCH) CAPAH (00BDH) CAPBL (00BEH) CAPBH (00BFH)
Timer Register
TREG8H (00A9H) TREG9L (00AAH) TREG9H (00ABH) CAP8L (00ACH) CAP8H (00ADH) CAP9L (00AEH) CAP9H (00AFH)
Capture Register
92CD54I-101
2006-01-27
3.8.1
Internal data-bus
Internal data bus
INT output Register 0 Register 1 INTTR8 INTTR9
Block diagrams
Prescaler clock: T0 2 T1 Capture Register 8 CAP8H/L Caputure register 9 CAP9H/L T4 T16 4 8 16 32
Run/ Clear TRUN8
External INT input INT5 INT6 TMOD8
Timer flip-flop TFF8 TFF9
Timer flip-flop output TO8 Timer Flip-Flop control TO9 Over flow INT INTTO8
TFF1 (from timer 01) TI8 TI9 Capture, External INT input control Slelector Count Clock 16-bit up counter (UC8) TMOD8 T1 T16 TMOD8 Match detection TRUN8 TMOD8
Figure 3.8.1 Block Diagram of Timer 8
92CD54I-102
16-Bit Comparator (CP8) 16-Bit timer register TREG8H/L TRUN8 Register Buffer 8 Internal data bus
Match detection 16-Bit Comparator (CP9)
16-Bit Time Register TREG9H/L
Intenal data bus
TMP92CD54I
2006-01-27
Internal data bus
Internal data bus
INT output Register 0 Register 1 INTTRA INTTRB
Prescaler clock : T0 2 T1 Capture register A CAPAH/L Caputure Register B CAPBH/L T4 T16 4 8 16 32 External INT input INT7 TMODA
Run/ Clear TRUNA
Timer flip-flop TFFA TFFB
Timer flip-flop output TOA Timer Flip-Flop control TOB Over flow INT INTTOA
TFF1 (from timer 01) TIA TIB Capture, External INT input control TMODA TMODA Match detection
TRUNA TMODA 16-Bit Up-Counter (UCA)
Figure 3.8.2 Block diagram of Timer A
Slelector Count T1 clock T4 T16
92CD54I-103
16-Bit comparator (CPA) 16-Bit Timer Register TREGAH/L TB0RUN Register Buffer A Internal data bus
Match detection 16-Bit comparator (CPB)
16-Bit Time Register TREGBH/L
Intenal data bus
TMP92CD54I
2006-01-27
TMP92CD54I 3.8.2 Operation of each block
(1) Prescaler The 5-bit prescaler generates the source clock for timer 8. The prescaler clock (T0) is divided clock (divided by 4) from fc. This prescaler can be started or stopped using TRUN8. Counting starts when is set to 1; the prescaler is cleared to zero and stops operation when is set to 0.
Table 3.8.2 Prescaler clock resolution At fc=20MHz Output clock Interval T1 ( 8/fc) 0.4 s T4 ( 32/fc) 1.6 s T16 (128/fc) 102.4 s (2) Up-counter (UC8) UC8 is a 16-bit binary counter which counts up pulses input from the clock specified by TMOD8 . Any one of the prescaler internal clocks T1, T4 and T16 or an external clock input via the TI8 pin can be selected as the input clock. Counting or stopping & clearing of the counter is controlled by TRUN8. When clearing is enabled, the up-counter UC8 will be cleared to zero each time its value matches the value in the timer register TREG9H/L. Clearing can be enabled or disabled using TMOD8. If clearing is disabled, the counter operates as a free-running counter. A Timer Overflow interrupt (INTTO8) is generated when UC8 overflow occurs.
92CD54I-104
2006-01-27
TMP92CD54I
(3) Timer registers (TREG8H/L and TREG9H/L) These two 16-bit registers are used to set the interval time. When the value in the up-counter UC8 matches the value set in this timer register, the Comparator Match Detect signal will go Active. Setting data for timer register TREG8H/L and TREG9H/L is executed using 2 byte data transfer instruction or using 1 byte date transfer instruction twice for lower 8 bits and upper 8 bits in order. The TREG8 timer register has a double-buffer structure, which is paired with register buffer 8. The value set in TRUN8 determines whether the double-buffer structure is enabled or disabled: it is disabled when = 0, and enabled when = 1. When the double buffer is enabled, data is transferred from the register buffer to the timer register when the values in the up-counter (UC8) and the timer register TREG9 match. After a Reset, TREG8 and TREG9 are undefined. If the 16-bit timer is to be used after a Reset, data should be written to it beforehand. On a Reset is initialized to 0, disabling the double buffer. To use the double buffer, write data to the timer register, set to 1, then write data to the register buffer as shown below. TREG8 and the register buffer both have the same memory addresses (0000A8H & 0000A9H) allocated to them. If = 0, the value is written to both the timer register and the register buffer. If = 1, the value is written to the register buffer only. The addresses of the Timer Registers are as follows:
Timer 8 TREG8 Upper 8 bits 0000A9H Lower 8 bits 0000A8H Upper 8 bits 0000ABH TREG9 Lower 8 bits 0000AAH
Timer A TREGA Upper 8 bits 0000B9H Lower 8 bits 0000B8H Upper 8 bits 0000BBH TREGB Lower 8 bits 0000BAH
The Timer Registers are write-only registers and thus cannot be read.
92CD54I-105
2006-01-27
TMP92CD54I
(4) Capture Registers (CAP8H/L and CAP9H/L) These 16-bit registers are used to latch the values in the up-counter UC8. Data in the Capture Registers should be read using a 2-byte data load instruction or two 1-byte data load instructions. The least significant byte is read first, followed by the most significant byte. The addresses of the Capture Registers are as follows:
Timer 8 CAP8 Upper 8 bits 0000ADH Lower 8 bits 0000ACH Upper 8 bits 0000AFH CAP9 Lower 8 bits 0000AEH
Timer A CAPA Upper 8 bits 0000BDH Lower 8 bits 0000BCH Upper 8 bits 0000BFH CAPB Lower 8 bits 0000BEH
The Capture Registers are read-only registers and thus cannot be written to.
(5) Capture input control and external interrupt control This circuit controls the timing to latch the value of up-counter UC8 into CAP8, CAP8 and the generation of external interrupts. The latch timing for the capture register and selection of edge for external interrupt is determined by TMOD8. The edge of external interrupt INT6 is fixed to rise edge. In addition, the value in the up-counter UC8 can be loaded into a capture register by software. Whenever 0 is written to TMOD8, the current value in the up-counter UC8 is loaded into capture register CAP8. It is necessary to keep the prescaler in Run Mode (i.e. TRUN8 must be held at a value of 1). (6) Comparators (CP8 and CP9) CP8 and CP9 are 16-bit comparators which compare the value in the up-counter UC8 with the value set in TREG8 or TREG9 respectively, in order to detect a match. If a match is detected, the comparator generates an interrupt (INTTR8 or INTTR9 respectively). (7) Timer flip-flops (TFF8 and TFF9) These flip-flops are inverted by the match detect signals from the comparators and the latch signals to the Capture Registers. Inversion can be enabled and disabled for each element using TFFCR8. After a reset the value of TFF8 and TFF9 are undefined. If 00 is written to TFFCR8 or , TFF8 or TFF9 will be inverted. If 01 is written to the capture registers, the value of TFF8 or TFF9 will be set to 1.If 10 is written to the capture registers, the value of TFF8 or TFF9 will be set to 0. The values of TFF8 and TFF9 can be output via the Timer Output pins TO8 (which is shared with PD2) and TO9 (which is shared with PD3). Timer output should be specified using the Port D SFRs.
92CD54I-106
2006-01-27
TMP92CD54I 3.8.3 SFR
Timer 8 Run Register
7
TRUN8 (00A0H) Bit symbol Read/Write After Reset T8RDE R/W 0 Double Buffer 0: Disable 1: Enable
6
R/W 0 Write 0
5
-
4
-
3
I2T8 R/W 0 IDLE2 0: Stop
2
T8PRUN
1
-
0
T8RUN R/W 0
R/W 0 Timer Run/Stop control 0: Stop & Clear
Function
1: Operate 1: Run (count up)
Count operation 0 1 Stop and Clear Count
I2T8: Operation during IDLE2-mode
Note: The 1, 4 and 5 of TRUN8 are read as underfined value.
T8PRUN: Operation of prescaler T8RUN: Operation of Timer 8
Timer A Run Register
7
TRUNA (00B0H) Bit symbol Read/Write After Reset TARDE R/W 0 Double Buffer 0: Disable 1: Enable
6
R/W 0 Write 0
5
-
4
-
3
I2TA R/W 0 IDLE2 0: Stop
2
TAPRUN
1
-
0
TARUN R/W 0
R/W 0
Function
16 Bit Timer Run/Stop control 0: Stop & Clear
1: Operate 1: Run (count up)
Count Operation 0 1 Stop and Clear Count
I2TA: Operation during IDLE2-mode
Note: The 1, 4 and 5 of TRUNA are read as underfined value.
TAPRUN: Operation of prescaler TARUN: Operation of Timer A
Figure 3.8.3 Registers for 16-bit Timers
92CD54I-107
2006-01-27
TMP92CD54I
Timer 8 Mode Register
7
TMOD8 (00A2H) Bit symbol Read/Write After Reset Function 0
TFF9 inversion 0: Disable trigger 1: Enable trigger
Invert when the UC value is captured to CAP9.
6
EQ9T9 0 R/W
5
CAP8IN W 1
Execute software capture 0: Execute 1: Don't care
4
3
2
T8CLE R/W 0
Control up-counter 0: Disable clearing 1: Enable clearing
1
T8CLK1 0
00: TI8 pin 01: T1 10: T4 11: T16
0
T8CLK0 0
CAP9T9
CAP89M1 CAP89M0 0 0
Invert when the UC value matches the value in TREG9.
Note) Always read as 1.
Capture timing 00: Disable INT5 occurs on rising edge. 01: TI8 TI9 INT5 occurs on rising edge. 10: TI8 TI8 INT5 occurs on falling edge. 11: TFF1 TFF1 INT5 occurs on rising edge.
Timer 8 source clock
Timer 8 source clock 00 01 10 11 TI8 pin T1 T4 T16
Up-counter (UC8) clear control 0 1 Disable Enable clearing by match with TREG9.
Capture/Interrupt timing Capture control 00 01 10 11 Disable
CAP8 at TI8 rise CAP9 at TI9 rise CAP8 at TI8 rise CAP9 at TI8 fall CAP8 at TFF1 rise CAP9 at TFF1 fall of TI8. INT5 occurs on falling edge of TI8. INT5 occurs on rising edge of TI8.
INT5 control
INT5 occurs on rising edge
Software capture 0 1 The value in the up-counter is captured to CAP8. Don't care
Figure 3.8.4 Registers for 16-bit Timers
92CD54I-108
2006-01-27
TMP92CD54I
Timer A Mode Register
7
TMODA (00B2H) Bit symbol Read/Write After Reset 0
TFFB inversion 0: Disable trigger 1: Enable trigger
Invert when the UC value
6
EQBTB 0 R/W
5
CAPAIN W 1
Execute software capture 0: Execute 1: Don't care
4
3
2
TACLE R/W 0
Control up-counter 0: Disable clearing 1: Enable clearing
1
TACLK1 0
00: TIA pin 01: T1 10: T4 11: T16
0
TACLK0 0
CAPBTB
CAPABM1 CAPABM0 0 0
Invert when the UC value matches the value in TREGB.
Function
is captured to CAPB.
Note) Always read as 1.
Capture timing 00: Disable INT7 occurs on rising edge. 01: TIA TIB INT7 occurs on rising edge. 10: TIA TIA INT7 occurs on falling edge. 11: TFF1 TFF1 INT7 occurs on rising edge.
Timer A source clock
Timer A source clock 00 01 10 11 TIA pin T1 T4 T16
Up-counter clear control 0 1 Disable Enable clearing on match with TREGB.
Capture/Interrupt timing Capture control 00 01 10 11 Disable
CAPA at TIA rise CAPB at TIB rise CAPA at TIA rise CAPB at TIA fall CAPA at TFF1 rise CAPB at TFF1 fall of TIA. INT7 occurs on falling edge of TIA. INT7 occurs on rising edge of TIA.
INT7 control
INT7 occurs on rising edge
Software capture 0 1 The value in the up-counter is captured to CAPA. Don't care
Figure 3.8.5 Registers for 16-bit Timers
92CD54I-109
2006-01-27
TMP92CD54I
Timer 8 Flip-Flop Control Register
7
TFFCR8 (00A3H) Bit symbol Read/Write After Reset 1
TFF9C1
6
TFF9C0
5
CAP9T8
4
CAP8T8
3
EQ9T8
2
EQ8T8
1
TFF8C1
0
TFF8C0
W 1 0 0 Control TFF9 00: Invert 01: Set 10: Clear 11: Don't care Note)Always read as 11 TFF8 inversion trigger 0: Disable trigger 1: Enable trigger
R/W 0 0 1
W 1
Function
Control TFF8 00: Invert 01: Set 10: Clear 11: Don't care Invert when Invert when Invert when Invert when the UC value the UC value the UC value the UC value Note)Always read as 11
is loaded in to CAP9. is loaded in to CAP8. matches the matches the value in value in TREG9. TREG8.
TFF8 control 00 Invert 01 10 11 Set to 1 Clear to 0 Don't care
TFF8 Inverted when the UC value is matched to TREG8. 0 Disable trigger 1 Enable trigger
TFF8 Inverted when the UC value is matched to TREG9. 0 1 Disable trigger Enable trigger
TFF8 Inverted when the UC value is loaded to CAP8. 0 1 Disable trigger Enable trigger
TFF8 Inverted when the UC value is loaded to CAP9. 0 1 Disable trigger Enable trigger
TFF9 control 00 01 10 11 Invert Set to 1 Clear to 0 Don't care
Figure 3.8.6 Registers for 16-bit Timers
92CD54I-110
2006-01-27
TMP92CD54I
Timer A Flip-Flop Control Register
7
TFFCRA (00B3H) Bit symbol Read/Write After Reset 1
TFFBC1
6
TFFBC0
5
CAPBTA
4
CAPATA
3
EQBTA
2
EQATA
1
TFFAC1
0
TFFAC0
W 1 0 0 Control TFFB 00: Invert 01: Set 10: Clear 11: Don't care Note)Always read as 11 TFFA inversion trigger 0: Disable trigger 1: Enable trigger
R/W 0 0 1
W 1
Function
Control TFFA 00: Invert 01: Set 10: Clear 11: Don't care Invert when Invert when Invert when Invert when the UC value the UC value the UC value the UC value Note)Always read as 11
is loaded in to CAPB. is loaded in to CAPA. matches the matches the value in value in TREGB. TREGA.
TFFA control 00 Invert 01 10 11 Set to 1 Clear to 0 Don't care
TFFA Inverted when the UC value matches to TREGA. 0 Disable trigger 1 Enable trigger
TFFA Inverted when the UC value matches to TREGB. 0 1 Disable trigger Enable trigger
TFFA Inverted when the UC value is loaded to CAPA. 0 1 Disable trigger Enable trigger
TFFA Inverted when the UC value is loaded to CAPB. 0 1 Disable trigger Enable trigger
TFFB control 00 01 10 11 Invert Set to 1 Clear to 0 Don't care
Figure 3.8.7 Registers for 16-bit Timers
92CD54I-111
2006-01-27
TMP92CD54I
Timer Register (Timer8, TimerA)
Symbol TREG8L Address A8H (no RMW) A9H (no RMW) AAH (no RMW) ABH (no RMW) B8H (no RMW) B9H (no RMW) BAH (no RMW) BBH (no RMW) 7 6 5 4 W Undefined W Undefined W Undefined W Undefined W Undefined W Undefined W Undefined W Undefined TREG8H 3 2 1 0
TREG9L
TREG9H
TREGAL
TREGAH
TREGBL
TREGBH
Capture Register (Timer8, TimerA
Symbol CAP8L Address ACH 7 6 5 4 R Undefined CAP8H ADH R Undefined CAP9L AEH R Undefined CAP9H AFH R Undefined CAPAL BCH R Undefined CAPAH BDH R Undefined CAPBL BEH R Undefined CAPBH BFH R Undefined 3 2 1 0
Figure 3.8.8 Registers for 16-bit Timers.
92CD54I-112
2006-01-27
TMP92CD54I 3.8.4 Operation in each mode
(1) 16-Bit Interval Timer Mode Generating interrupts at fixed intervals In this example, the interrupt INTTR9 is set to be generated at fixed intervals. The interval time is set in the timer register TREG9.
TRUN8 INTET89 TFFCR8 TMOD8 TREG9 TRUN8
7 0 X 1 0 6 0 1 1 0 54 XX 00 00 10 (** = ** ** XX 3210 -0X0 X000 0011 01** 01, 10, 11) **** **** -1X1 Stop timer 8. Set INTTR9 Interrupt Level to 4. Disable INTTR8. Disable the trigger. Select internal clock for input and disable the capture function. Set the interval time (16 bits). Start timer 8.
* * 0
* * 0
Note: X = Don't care; "-" = No change
(2) 16-Bit Event Counter Mode As described above, in 16-Bit Timer Mode, if the external clock (TI8 pin input) is selected as the input clock, the timer can be used as an event counter. The counter counts at the rising edge of TI8 pin input. To read the value of the counter, first perform "software capture" once, then read the captured value.
TRUN8 PDCR PDFC INTET89 TFFCR8 TMOD8 TREG9 TRUN8
7 0 - X 1 0 * * 0 6 0 - 1 1 0 * * 0 5 X - 0 0 1 * * X 4 X - 0 0 0 * * X 3 - - X 0 0 * * - 2 0 - 0 0 1 * * 1 1 X - 0 1 0 * * X 0 0 1 1 0 1 0 * * 1 Stop timer 8. Set PD0 to TI8. Set INTTR9 Interrupt Level to 4. Disable INTTR8. Disable the trigger. Select TI8 as the input clock. Set the number of counts (16 bits). Start timer 8.
Note: X = Don't care; "-" = No change When the timer is used as an event counter, set the prescaler in Run Mode (i.e. with TRUN8 = 1).
92CD54I-113
2006-01-27
TMP92CD54I
(3) 16-Bit Programmable Pulse Generation (PPG) Output Mode Square wave pulses can be generated at any frequency and duty ratio. The output pulse may be either Low-active or High-active. The PPG mode is obtained by inversion of the timer flip-flop TFF8 that is to be enabled by the match of the up-counter UC8 with timer register TREG8 or TREG9 and to be output to TO8. In this mode the following conditions must be satisfied. (Value set in TREG8) < (Value set in TREG9)
Match with TREG8 (INTTR8 inerrupt) Match with TREG9 (INTTR9 interrupt) TO8 pin
Figure 3.8.9 Programmable Pulse Generation (PPG) Output Waveforms
When the TREG8 double buffer is enabled in this mode, the value of Register Buffer 8 will be shifted into TREG8 at match with TREG9. This feature facilitates the handling of low-duty waves.
Match with TREG8 Up-counter = Q1 Match with TREG9 TREG8 (value to be compared) Register buffer Q1 Q2 Up-counter = Q2 Shift into theTREG9 Q2 Q3 Write into the TREG8
Figure 3.8.10 Operation of Register Buffer
92CD54I-114
2006-01-27
TMP92CD54I
The following block diagram illustrates this mode. TRUN8TI8 T1 T4 T16
Selector
16-Bit up-counter UC8
TO8 (PPG output) F/F (TFF8)
clear
16-Bit Comparator
Match
16-Bit Comparator
Selector
TREG8
TREG8-W
Register buffer 8 TRUN8 TREG9
Internal bus
Figure 3.8.11 Block Diagram of 16-bit PPG Output Mode
The following example shows how to set 16-Bit PPG Output Mode:
TRUN8 TREG8 TREG9 TRUN8

7 0 * * * * 1
6 0 * * * * 0
5 X * * * * X
4 X * * * * X
3 - * * * * -
2 0 * * * * 0
1 X * * * * X
0 0 * * * * 0
Disable the TREG8 double buffer and stop timer 8. Set the duty ratio (16 bits). Set the frequency (16 bits). Enable the TREG8 double buffer. (The duty and frequency are changed on an INTTR9 interrupt.) Set the mode to invert TFF8 at the match with TREG8/TREG9. Set TFF8 to 0. Select the internal clock as the input clock and disable the capture function. Set PD2 to function as TO8. Start timer 8.
TFFCR8 TMOD8 PDCR PDFC TRUN8

X 0 - - 1
X 0 - - 0
0
0
1
1
1
0
10 (** = -- -XX
01** 01, 10, 11) -1-- -1--1X1
Note: X = Don't care; "-" = No change
92CD54I-115
2006-01-27
TMP92CD54I
(4) Capture function The capture function can be used in many ways. The following are examples: As a one-shot pulse output from external trigger pulse For frequency measurement For pulse width measurement For time difference measurement One-shot pulse output from external trigger pulse Set the up-counter UC8 to Free-Running Mode with the internal input clock, input an external trigger pulse via the TI8 pin, and load the value of the up-counter into the capture register CAP8 on the rising edge of the TI8 input signal. When the interrupt INT5 is generated on the rising edge of the TI8 input, set the CAP8 value (c) plus a delay time (d) in TREG8 and set this value (c + d) plus the one-shot pulse width (p) in TREG9. (Thus TREG8 = c + d and TREG9 = c + d + p). When the interrupt INT5 occurs, TFFCR8 should be set to 11 and that the TFF8 inversion is enabled only when the up-counter value matches TREG8 or TREG9. When an INTTR9 interrupt occurs, a one-shot pulse will be output and inversion will be disabled. (c), (d) and (p) correspond to c, d and p in Figure 3.8.12.
Set the counter in Free-Running Mode. Count clock (internal clock) TI8 pin input (external trigger pulse) Match with TREG8 Inversion enable Disables inversion caused by loading of the Delay time (d) INTTR9 occurred Inversi on Pulse width (p) c c+d c+d+p
Load the up-counter value into Capture Register (CAP8) and INT5 occurred
Match with TREG9
Timer output pin TO8
Figure 3.8.12 One-shot pulse output (with delay)
92CD54I-116
2006-01-27
TMP92CD54I
Setting example: To output a 2-ms one-shot pulse with a 3-ms delay to the external trigger pulse via the TI8 pin.
Main settings Keep counting (maintain free-running counter). Count using T1.
TMOD8 TFFCR8

X X
X X
1 0
0 0
1 0
0 0
0 1
1 0
Load the up-counter value into CAP8 on the rising edge of the input to the TI8 pin. Clear TFF8 to zero. Disable TFF8 inversion. Set PD2 to function as the TO8 pin.
PDCR PDFC INTE56 INTET89 TRUN8

- - X X -
- - - 0 0
- - 0 X
- - 0 X
- - X X -
1 1 1 0 1
- 0 0 X
- 0 0 1
Set INT5 Interrupt level to 4. Disable INTTR8 and INTTR9. Start timer 8.
Setting of INT5
TREG8 TREG9 TFFCR8
CAP8 + 3 ms/T1 TREG8 + 2 ms/T1 XX--11
-
-
Enable TFF8 inversion when the up-counter value matches the value of TREG8 or TREG9. Enable INTTR9.
INTET89
X
1
0
0
X
-
-
-
Setting INTTR9
TFFCR8
X
X
-
-
0
0
-
-
Disable TFF8 inversion when the up-counter value matches the value of TREG8 or TREG9. Disable INTTR9.
INTET89
X
0
0
0
X
-
-
-
Note: X = Don't care; "-" = No change
If no delay time is necessary, invert the timer flip-flop TFF8 when the up-counter value is loaded into the capture register (CAP8) and set the value of TREG9 to the value of CAP8 (c) plus the one-shot pulse width (p) when the interrupt INT5 occurs. TFF8 inversion should be enabled when the up-counter (UC8) value matches TREG9, and disabled when generating the interrupt INTTR9.
92CD54I-117
2006-01-27
TMP92CD54I
Count clock (internal clock) TI8 pin input (external trigger pulse) Match with TREG9 Timer output TO8 Enables inversion caused by loading of the up-counter value into CAP8.
c
c+p Load the up-counter value into Capture Register (CAP8). INT5 occurred INTTR9 occurred Inversion Pulse width (p)
Load the up-counter value into Capture Register (CAP9)
Disables incersioncaused by loading of the up-counter value into CAP9.
Figure 3.8.13 One-shot pulse output (without delay)
Frequency measurement
The frequency of the external clock can be measured in this mode. The clock is input via the TI8 pin and its frequency is measured using the two 8-bit timers of timers 01 and the 16-bit timer / event counter timer 8. The TI8 pin input should be selected as the clock input to timer 8. Set TMOD8 to 11. The value of the up-counter is loaded into the capture register CAP8 on the rising edge of the TFF1 signal from the timer flip-flop for the two 8-bit timers (timers 01), and loaded into CAP9 on the falling edge of the TFF1 signal. The frequency is calculated using the difference between the values loaded into CAP8 and CAP9 when the interrupt (INTT0 or INTT1) is generated by either one of the 8-bit timers. Count clock (TI8 input clock)
TFF1 Loading UC into CAP8 Loading UC into CAP9 INTT0/INTT1 C8 C9 C8 C9
C8
C9
Figure 3.8.14 Frequency Measurement
For example, if the value for the level 1 width of TFF1 of the 8-bit timer is set to 0.5 s and the difference between the values in CAP8 and CAP9 is 100, the frequency is 100 / 0.5 s = 200 Hz.
92CD54I-118
2006-01-27
TMP92CD54I
Pulse width measurement This mode allows the H-level width of an external pulse to be measured. With the 16-bit timer / event counter operating as a free-running counter counting the pulses from the internal clock input, the external pulse is input via the TI8 pin. Then, the capture function is used to load values from UC8 into CAP8 and CAP9 on the rising and falling edges of the external trigger pulse respectively. The interrupt INT5 occurs on the falling edge of TI8. The pulse width is obtained from the difference between the values in CAP8 and CAP9 and the period of the internal clock. For example, if the period of the internal clock is 0.8 microseconds and the difference between the values in CAP8 and CAP9 is 100, the pulse width is 100 x 0.8 s = 80 s. In addition, the pulse width which is over the UC8 maximum count time specified by the clock source can be measured by changing software. Count clock (internal clock) TI8 pin (external pulse)
Loading UC into CAP8 Loading UC into CAP9 INT5 C8 C9 C8 C9
C8
C9
Figure 3.8.15 Pulse width measurement
Note: In Pulse Width Measuring Mode only (i.e. when TMOD8 = 10), the external interrupt INT5 occurs on the falling edge of the signal input to the TI8 pin. In other modes it occurs on the rising edge.
The width of the L level is obtained by multiplying the difference between the first C9 and the second C8 at the second INT5 interrupt by the period of the internal clock.
92CD54I-119
2006-01-27
TMP92CD54I
Time difference measurement This mode is used to measure the time difference between the rising edges of the external pulses input via TI8 and TI9. With the 16-bit timer / event counter (timer 8) operating as a free-running counter counting the pulses from the internal clock input, load the UC8 value into CAP8 on the rising edge of the signal input via TI8. This generates the interrupt INT5. Similarly, the UC8 value is loaded into CAP9 on the rising edge of the signal input via TI9, generating the interrupt INT6. The time difference between these pulses can be obtained by multiplying the value subtracted CAP8 from CAP9 and the internal clock cycle together at which loading the up-counter value into CAP8 and CAP9 has been done.
Count clock (internal clock) TI8 pin input TI9 pin input Loading UC into CAP8
C8
C9
Loading UC into CAP9 INT5
INT6 Time digerence
Figure 3.8.16 Time difference measurement
92CD54I-120
2006-01-27
TMP92CD54I
3.9
Serial Channels
TMP92CD54I includes two serial I/O channels. For both channels either UART Mode (asynchronous transmission) or I/O Interface Mode (synchronous transmission) can be selected. * I/O Interface Mode Mode 0: For transmitting and receiving I/O data using the synchronizing signal SCLK for extending I/O. 7-bit data 8-bit data 9-bit data
* UART Mode
Mode 1: Mode 2: Mode 3:
In Mode 1 and Mode 2, a parity bit can be added. Mode 3 has a wake-up function for making the master controller start slave controllers in a serial link (a multi-controller) system. Figure 3.9.2 to Figure 3.9.3 are block diagrams for each channel. Serial Channels 0 and 1 can be used independently. Both channels operate in the same function except for the following points; thus only the operation of Channel 0 is explained below. Table 3.9.1 Differences between Channels 0 to 1 Channel 0
Pin Name TXD0 (PF0) RXD0 (PF1)
CTS0 /SCLK0 (PF2)
Channel 1
TXD1 (PF3) RXD1 (PF4) CTS1 /SCLK1 (PF5)
* Mode 0 (I/O Interface Mode)
bit 0 1 2 3 4 5 6 7
Transfer direction
* Mode 1 (7-Bit UART Mode)
No parity start bit 0 1 2 3 4 5 6 stop
Parity
start
bit 0
1
2
3
4
5
6
parity stop
* Mode 2 (8-Bit UART Mode)
No parity start bit 0 1 2 3 4 5 6 7 stop
Parity
start
bit 0
1
2
3
4
5
6
7
parity stop
* Mode 3 (9-Bit UART Mode)
start bit 0 1 2 3 4 5 6 7 8 stop
start
bit 0
1
2
3
4
5
6
7
bit 8
stop (Wake-up)
When Bit 8 = 1, an address (select code) is denoted. When Bit 8 = 0, data is denoted.
Figure 3.9.1 Data formats
92CD54I-121
2006-01-27
TMP92CD54I 3.9.1 Block diagrams
T0
prescaler 2 4 8 16 32 64 T2 T8 T32 Serial clock generation circuit BR0CR

T0TRG (from timer 0) BR0ADD
BR0CR

T0 T2 T8 T32
Prescaler
Selector
Selector
Selector
UART Mode
SIOCLK
BR0CR

SC0MOD0

SC0MOD0

/2 SCLK0 shared with PF2 I/O Interface Mode
Selector

1(fC/2)
Baud rate generator
I/O interface mode
SC0CR INT request INTRX0 INTTX0 SC0MOD0 Serial channel interrupt control TXDCLK Receive Control SC0CR

SCLK0 shared with PF2
(UART only / 16)
Receive Counter
(UART only / 16)
Transmision counter
RXDCLK SC0MOD0

Transmission Control SC0MOD0

CTS0 shared with PF2
Parity control
RXD0 shared with PF1
Receive Buffer1 (shift register)
RB8
Receive Buffer2 (SC0BUF)
Error flag
TB8
Transmission Buffer
SC0CR

TXD0 shared with PF0
Internal bus
Figure 3.9.2 Block diagram of the Serial Channel 0
92CD54I-122
2006-01-27
TMP92CD54I
T0 prescaler 2 4 8 16 32 64 T2 T8 T32 Serial clock generation circuit BR1CR

T0TRG (from timer 0) BR1ADD

BR1CR

T0 T2 T8 T32
Prescaler
Selector
Selector
Selector
UART Mode
SIOCLK
BR1CR

SC1MOD0

SC1MOD0

/2 SCLK1 shared with PF5 I/O Interface Mode
Selector

1(fC/2)
Baud rate generator
I/O interface mode
SC1CR INT request INTRX1 INTTX1 SC1MOD0 Serial Channel Interrupt Control TXDCLK Receive Control SC1CR

SCLK1 shared with PF5
(UART only / 16)
Receive Counter
(UART only / 16)
Transmision counter
RXDCLK SC1MOD0
Transmission Control SC1MOD0

CTS1 shared with PF5
Parity Control
RXD1 shared with PF4
Receive Buffer1 (shift register)
RB8
Receive buffer2 (SC1BUF)
Error flag
TB8
Transmission Buffer
SC1CR

TXD1 shared with PF3
Internal bus
Figure 3.9.3 Block diagram of the Serial Channel 1
92CD54I-123
2006-01-27
TMP92CD54I 3.9.2 Operation for each circuit
(1) Prescaler, Prescaler clock select There is a 6-bit prescaler for making serial clock. The prescaler can be run by selecting the baud rate generator as the making serial clock. Table 3.9.2 shows prescaler clock resolution into the baud rate generator. Table 3.9.2 Prescaler Clock Resolution to Baud Rate Generator At fc=20MHz Output clock Clock resolution T0 ( 4/fc) 0.2s T2 ( 16/fc) 0.8s T8 ( 64/fc) 3.2s T32 (256/fc) 12.8s
The Baud Rate Generator selects between 4 clock inputs : T0, T2, T8, and T32 among the prescaler outputs.
X1 X2 (10MHz) (10MHz)
OSC
x4
/2
T0
T2
T8
T32
System clock fc (20MHz)
0
/4
12345 6-bit Prescaler
/2
fIO fIO (Internal I/O clock)
92CD54I-124
2006-01-27
TMP92CD54I
(2) Baud rate generator The baud rate generator is a circuit which generates transmission and receiving clocks which determine the transfer rate of the serial channels. The input clock to the baud rate generator, T0, T2, T8 or T32, is generated by the 6-bit prescaler. One of these input clocks is selected using the BR0CR field in the Baud Rate Generator Control Register. The baud rate generator includes a frequency divider, which divides the frequency by N (N=1 to 16) or by N + (16-K) / 16 (N=2 to 15 and K = 1 to 15). Note that the part (16-K)/16 can be disabled, resulting in a division of N.
A division of N+(16-K)/16 can be
[
2+1/16; 3+1/16; :; :; 15+1/16; 1; 2;
2+2/16; 3+2/16; :; :; 15+2/16; 3; ...;
...... ...... : : ...... 14;
; ; ; ; ;
2+15/16; 3+15/16; :; :; 15+15/16; 15; 16;
] ]
A division of N can be
[
so the overall division can take any value in the range [1; N+(16-K)/16; 16] with N = 2, 3, ..., 15 and K = 1, 2, ..., 15. The transfer rate is determined by the settings of BR0CR and BR0ADD: BR0CR: +(16-K)/16 division 0: Disabled 1: Enabled BR0CR: setting of the divided frequency 0000: N=16 (Unselectable when using the division N+(16-K)/16) 0001: N= 1 0010: N= 2 : : 1111: N=15 BR0ADD: sets the frequency divisor "K" (when using the division N+(16-K)/16) 0000: Disabled 0001: K=1 : : 1111: K=15
* In UART Mode
(1) When BR0CR = 0 - The settings BR0ADD are ignored. - The baud rate generator divides the selected prescaler clock by N. - N is set in BR0CK. (N = 1, 2, 3, ..., 16) (2) When BR0CR = 1 - The N + (16 - K) / 16 division function is enabled. - N is set in BR0CR (N = 2, 3, 4, ..., 15) - K is set in BR0ADD (K = 1, 2, 3,..., 15) NOTE: At N=1 or N=16, the N+(16-K)/16 division function is disabled. Therefore set BR0CR to "0".
92CD54I-125
2006-01-27
TMP92CD54I
* In I/O Interface Mode
- The N + (16 - K) / 16 division function is not available in I/0 Interface Mode - Set BR0CR to "0" - Therefore the settings BR0ADD are ignored - The baud rate generator divides the selected prescaler clock by N - N is set in BR0CR (N=1, 2, 3, ..., 16) The method for calculating the transfer rate when the baud rate generator is used is explained below. * In UART Mode Baud rate generator input clock frequency Baud Rate = / 16 Frequency divider for baud rate generator * In I/O Interface Mode Baud rate generator input clock frequency Baud Rate = /2 Frequency divider for baud rate generator
92CD54I-126
2006-01-27
TMP92CD54I
* Integer divider (N divider) For example, when the source clock frequency (fc) is 19.6608 MHz, the input clock is T2 (fc/16), the frequency divider N (BR0CR) = 8, and BR0CR = 0, the baud rate in UART Mode is as follows: fc/16 / 16 8
Baud Rate =
= 19.6608 x 106 / 16 / 8 / 16 = 9600 (bps) Note: The N + (16 - K) / 16 division function is disabled and setting BR0ADD is invalid. * N+(16-K)/16 divider (UART Mode only) Accordingly, when the source clock frequency (fc) = 15.9744 MHz, the input clock is T2 (fc/16), the frequency divider N (BR0CR) = 6, K (BR0ADD) = 8, and BR0CR = 1, the baud rate in UART Mode is as follows: fc/16 / 16 6 + (16 - 8)/16
Baud Rate =
= 15.9744 x 106 / 16 / (6+8/16) / 16 = 9600 (bps)
Table 3.9.3 to 4 show examples of UART Mode transfer rates. Additionally, the external clock input is available in the serial clock. (Serial Channels 0 & 1). The method for calculating the baud rate is explained below: * In UART Mode Baud rate = external clock input frequency / 16 (External clock input frequency) must be less than or equal to fc/4 * In I/O Interface Mode Baud rate = external clock input frequency (External clock input frequency) must be less than or equal to fc/16
92CD54I-127
2006-01-27
TMP92CD54I
Table 3.9.3 Selection of Transfer Rate(1) (when baud rate generator Is used and BR0CR = 0)
Unit (kbps)
fc [MHz]
18.432000 19.660800
Input Clock Frequency Divider
15 8 16
T0 (4/fc)
19.200 38.400 19.200
T2 (16/fc)
4.800 9.600 4.800
T8 (64/fc)
1.200 2.400 1.200
T32 (256/fc)
0.300 0.600 0.300
Note: Transfer rates in I/O Interface Mode are eight times faster than the values given above.
Table 3.9.4 Selection of Transfer Rate(2) (When timer 0 with input Clock T1 is used)
Unit (kbps)
fc
TREG0
02H 04H 05H 08H 10H
20 MHz
19.6608 MHz
76.8 38.4
16 MHz
62.5 31.25
31.25 19.2 9.6
Method for calculating the transfer rate (when timer 0 is used): fc TREG0 x 8 x 16 (when timer 0 (input clock T1) is used) Note: The timer 0 match detect signal cannot be used as the transfer clock in I/O Interface Mode.
Transfer rate =
92CD54I-128
2006-01-27
TMP92CD54I
(3) Serial clock generation circuit This circuit generates the basic clock for transmitting and receiving data. * In I/O Interface Mode In SCLK Output Mode with the setting SC0CR = 0, the basic clock is generated by dividing the output of the baud rate generator by 2, as described previously. In SCLK Input Mode with the setting SC0CR = 1, the rising edge or falling edge will be detected according to the setting of the SC0CR register to generate the basic clock. * In UART Mode The SC0MOD0 setting determines whether the baud rate generator clock, the internal clock 1 (fc/2), the match detect signal from timer 0 or the external clock (SCLK0) is used to generate the basic clock SIOCLK. (4) Receiving counter The receiving counter is a 4-bit binary counter used in UART Mode which counts up the pulses of the SIOCLK clock. It takes 16 SIOCLK pulses to receive 1 bit of data; each data bit is sampled three times - on the 7th, 8th and 9th clock cycles. The value of the data bit is determined from these three samples using the majority rule. For example, if the data bit is sampled respectively as 1, 0 and 1 on 7th, 8th and 9th clock cycles, the received data bit is taken to be 1. A data bit sampled as 0, 0 and 1 is taken to be 0. (5) Receiving control * In I/O Interface Mode In SCLK Output Mode with the setting SC0CR = 0, the RXD0 signal is sampled on the rising edge of the shift clock which is output on the SCLK0 pin. In SCLK Input Mode with the setting SC0CR = 1, the RXD0 signal is sampled on the rising or falling edge of the SCLK0 input, according to the SC0CR setting. * In UART Mode The receiving control block has a circuit which detects a start bit using the majority rule. Received bits are sampled three times; when two or more out of three samples are 0, the bit is recognized as the start bit and the receiving operation commences. The values of the data bits that are received are also determined using the majority rule.
92CD54I-129
2006-01-27
TMP92CD54I
(6) The Receiving Buffers To prevent Overrun errors, the Receiving Buffers are arranged in a double-buffer structure. Received data is stored one bit at a time in Receiving Buffer 1 (which is a shift register). When 7 or 8 bits of data have been stored in Receiving Buffer 1, the stored data is transferred to Receiving Buffer 2 (SC0BUF); this causes an INTRX0 interrupt to be generated. The CPU only reads Receiving Buffer 2 (SC0BUF). Even before the CPU has finished reading the contents of Receiving Buffer 2 (SC0BUF), more data can be received and stored in Receiving Buffer 1. However, if Receiving Buffer 2 (SC0BUF) has not been read completely before all the bits of the next data item are received by Receiving Buffer 1, an Overrun error occurs. If an Overrun error occurs, the contents of Receiving Buffer 1 will be lost, although the contents of Receiving Buffer 2 and SC0CR will be preserved. SC0CR is used to store either the parity bit - added in 8-Bit UART Mode - or the most significant bit (MSB) - in 9-Bit UART Mode. In 9-Bit UART Mode the wake-up function for the slave controller is enabled by setting SC0MOD0 to 1; in this mode INTRX0 interrupts occur only when the value of SC0CR is 1. (7) Transmission counter The transmission counter is a 4-bit binary counter which is used in UART Mode and which, like the receiving counter, counts the SIOCLK clock pulses; a TXDCLK pulse is generated every 16 SIOCLK clock pulses.
SIOCLK 15 TXDCLK 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2
Figure 3.9.5 Generation of the transmission clock (8) Transmission controller * In I/O Interface Mode In SCLK Output Mode with the setting SC0CR = 0, the data in the Transmission Buffer is output one bit at a time to the TXD0 pin on the rising edge of the shift clock which is output on the SCLK0 pin. In SCLK Input Mode with the setting SC0CR = 1, the data in the Transmission Buffer is output one bit at a time to the TXD0 pin on the rising or falling edge of the SCLK0 input, according to the SC0CR setting. * In UART Mode When transmission data sent from the CPU is written to the Transmission Buffer, transmission starts on the rising edge of the next TXDCLK, generating a transmission shift clock TXDSFT.
92CD54I-130
2006-01-27
TMP92CD54I
Handshake function Serial Channels 0 & 1 each have a CTS pin. Use of this pin allows data can be sent in units of one frame; thus, Overrun errors can be avoided. The handshake functions is enabled or disabled by the SC0MOD0 setting. When the CTS0 pin foes High on completion of the current data send, data
transmission is halted until the CTS0 pin foes Low again. However, the INTTX0 Interrupt is generated, it requests the next data send to the CPU. The next data is written in the Transmission Buffer and data sending is halted. Although there is no RTS pin, a handshake function can easily be configured by assigning any port to perform the RTS function. The RTS should be output High to request send data halt after data receive is completed by software in the RXD interrupt routine.
92CD54I 92CD54I
TXD CTS Sender
RXD RTS (any port) Receiver
Figure 3.9.6 Handshake function
Timing to writing to the
CTS
Send is suspended from (1) and (2). (2) (1)
13
14
15
16
1
2
3
14
15
16
1
2
3
SIOCLK
TXDCLK bit 0
TXD
start bit
Note 1: If the CTS signal goes High during transmission, no more data will be sent after completion of the current transmission.
Note 2: Transmission starts on the first falling edge of the TXDCLK clock after the CTS signal has fallen.
Figure 3.9.7 CTS (Clear to send) Timing
92CD54I-131
2006-01-27
TMP92CD54I
(9) Transmission Buffer The Transmission Buffer (SC0BUF) shifts out and sends the transmission data written from the CPU, in order one bit at a time starting with the least significant bit (LSB) and finishing with the most significant bit (MSB). When all the bits have been shifted out, the empty Transmission Buffer generates an INTTX0 interrupt. (10) Parity control circuit When SC0CR in the Serial Channel Control Register is set to 1, it is possible to transmit and receive data with parity. However, parity can be added only in 7-Bit UART Mode or 8-Bit UART Mode. The SC0CR field in the Serial Channel Control Register allows either even or odd parity to be selected. In the case of transmission, parity is automatically generated when data is written to the Transmission Buffer SC0BUF. The data is transmitted after the parity bit has been stored in SC0BUF in 7-Bit UART Mode or in SC0MOD0 in 8-Bit UART Mode. SC0CR and SC0CR must be set before the transmission data is written to the Transmission Buffer. In the case of receiving, data is shifted into Receiving Buffer 1, and the parity is added after the data has been transferred to Receiving Buffer 2 (SC0BUF), and then compared with SC0BUF in 7-Bit UART Mode or with SC0CR in 8-Bit UART Mode. If they are not equal, a Parity error is generated and the SC0CR flag is set. (11) Error flags Three error flags are provided to increase the reliability of data reception. 1. Overrun error If all the bits of the next data item have been received in Receiving Buffer 1 while valid data still remains stored in Receiving Buffer 2 (SC0BUF), an Overrun error is generated. The below is a processing example of when Overrun error is occurred. (INTRX routine) 1)Read Received-Buffer 2)Read error-flag 3)if=1 then 4)Disable receiving(write 0 to ) 5)Wait for terminating current frame 6)Read received-buffer 7)Readerror-flag 8)Enable receiving(write 1 to ) 9)Request to resend 10)Process other job 2. Parity error The parity generated for the data shifted into Receiving Buffer 2 (SC0BUF) is compared with the parity bit received via the RXD pin. If they are not equal, a Parity error is generated. 3. Framing error The stop bit for the received data is sampled three times around the center. If the majority of the samples are 0, a Framing error is generated.
92CD54I-132
2006-01-27
TMP92CD54I
(12) Timing generation In UART Mode Receiving
Mode
Interrupt timing Framing error timing Parity error timing Overrun error timing
9-Bit (Note)
Center of last bit (bit 8) Center of stop bit
8-Bit + Parity (Note)
Center of last bit (parity bit) Center of stop bit Center of last bit (parity bit) Center of last bit (parity bit)
8-Bit, 7-Bit + Parity, 7-Bit
Center of stop bit Center of stop bit Center of last bit (parity bit) Center of stop bit
Center of last bit (bit 8)
Note: In 9-Bit Mode and 8-Bit + Parity Mode, interrupts coincide with the ninth bit pulse. Thus, when servicing the interrupt, it is necessary to allow a 1-bit period to elapse (so that the stop bit can be transferred) in order to allow proper framing error checking.
Transmitting
Mode
Interrupt timing
9-Bit
Just before stop bit is transmitted
8-Bit + Parity
Just before stop bit is transmitted
8-Bit, 7-Bit + Parity, 7-Bit
Just before stop bit is transmitted
I/O interface
Transmission Interrupt timing Receiving Interrupt timing SCLK Input Mode SCLK Input Mode SCLK Output Mode SCLK Output Mode Immediately after rise of last SCLK signal. (See figure 3.9 20.) Immediately after rise of last SCLK signal Rising Mode, or immediately after fall in Falling Mode. (See figure 3.9 21.) Timing used to transfer received data to Receive Buffer 2 (SC0BUF) (i.e. immediately after last SCLK). (See figure 3.9 22.) Timing used to transfer received data to Receive Buffer 2 (SC0BUF) (i.e. immediately after last SCLK). (See figure 3.9 23.)
92CD54I-133
2006-01-27
TMP92CD54I 3.9.3 SFR
7
Bit symbol SC0MOD0 Read/Write (00C2H) After Reset TB8 undefined Transfer data bit 8
6
CTSE 0 Hand shake
0: CTS disable 1: CTS enable
5
RXE 0 Receive function
0: Receive disable 1: Receive enable
4
WU
3
SM1
2
SM0
1
SC1
0
SC0
Function
R/W 0 0 0 Serial Transmission Wake up Mode function 00: I/O interface Mode 0: disable 01: 7-bit UART Mode 1: enable 10: 8-bit UART Mode 11: 9-bit UART Mode
0 0 Serial transmission clock (UART) 00: T0TRG 01: Baud rate generator 10: Internal clock 1 11: External clcok (SCLK0 input)
Serial transmission clock source (UART) 00 01 10 11 Timer 0 match detect signal (T0TRG) Baud rate generator Internal clock 1 External clock (SCLK0 input)
Note: The clock selection for the I/O interface mode is controlled by the serial control register (SC0CR). Serial Transmission Mode 00 01 10 11 I/O Interface Mode 7-bit mode UART 8-bit mode 9-bit mode
Wake-up function 9-Bit UART Other Modes Interrupt generated when 0 data is received Don't care Interrupt generated only 1 when RB8 = 1 Receiving Function 0 1 Receive disabled Receive enabled
Handshake function (CTS pin) Enable 0 1 Disabled (always transferable) Enabled
Transmission data bit 8
Figure 3.9.8 Serial Mode Control Register (channel 0, SC0MOD0)
92CD54I-134
2006-01-27
TMP92CD54I
7
Bit symbol SC1MOD0 Read/Write (00CAH) After Reset TB8 undefined Transfer data bit 8
6
CTSE 0 Hand shake
0: CTS disable 1: CTS enable
5
RXE 0 Receive function
0: Receive disable 1: Receive enable
4
WU
3
SM1
2
SM0
1
SC1
0
SC0
Function
R/W 0 0 0 Serial Transmission Wake up Mode function 00: I/O interface Mode 0: disable 01: 7-bit UART Mode 1: enable 10: 8-bit UART Mode 11: 9-bit UART Mode
0 0 Serial transmission clock (UART) 00: T0TRG 01: Baud rate generator 10: Internal clock 1 11: External clcok (SCLK1 input)
Serial transmission clock source (UART) 00 01 10 11 Timer 0 match detect signal (T0TRG) Baud rate generator Internal clock 1 External clock (SCLK1 input)
Note: The clock selection for the I/O interface mode is controlled by the serial control register (SC1CR). Serial Transmission Mode 00 01 10 11 I/O Interface Mode 7-bit mode UART 8-bit mode 9-bit mode
Wake-up function 9-Bit UART Other Modes Interrupt generated when 0 data is received Don't care Interrupt generated only 1 when RB8 = 1 Receiving Function 0 1 Receive disabled Receive enabled
Handshake function (CTS pin) Enable 0 1 Disabled (always transferable) Enabled
Transmission data bit 8
Figure 3.9.9 Serial Mode Control Register (channel 1, SC1MOD0)
92CD54I-135
2006-01-27
TMP92CD54I
7
bit Symbol SC0CR Read/Write (00C1H) After Reset
6
5
4
3
2
1
0
Function
RB8 EVEN PE R R/W undefined 0 0 Received Parity Parity data bit 8 0: odd addition 1: even 0: disable 1: enable
OERR PERR FERR R(cleared to 0 when read) 0 0 0 1: error
SCLKS IOC R/W 0 0 0: SCLK0 0: baud rate
generator 1: SCLK0 pin input
Overrun
Parity
Framing
1: SCLK0
I/O interface input clock selection 0 1 Baud rate generator SCLK0 pin input
Edge selection for SCLK0 pin (Input Mode Only) 0 1 Transmits and receivers data on rising edge of SCLK0. Transmits and receivers data on falling edge SCLK0.
Framing Error flag Parity Error flag Overrun Error flag Parity addition enable 0 1 Disabled Enabled
cleared to 0 when read
Even parity addition/check 0 1 Odd parity Even parity
Received data 8
Note: As all error flags are cleared after reading do not test only a single bit with a bit-testing instruction. Figure 3.9.10 Serial Control Register (channel 0, SC0CR)
92CD54I-136
2006-01-27
TMP92CD54I
7
bit symbol SC1CR Read/Write (00C9H) After Reset
6
5
4
3
2
1
0
Function
RB8 EVEN PE R R/W undefined 0 0 Parity Parity Received addition 0: odd data bit 8 0: disable 1: even 1: enable
OERR PERR FERR R (cleared to 0 when) 0 0 0 1: error
SCLKS IOC R/W 0 0 0: SCLK1 0: baud rate
generator 1: SCLK1 pin input
Overrun
Parity
Framing
1: SCLK1
I/O interface input clock select 0 1 Baud rate generator SCLK1 pin input
Edge selection for SCLK1 pin (input mode only) 0 1 Transmits and receives data on rising edge of SCLK1. Transmits and receives data on falling edge of SCLK1.
Framing Error flag Parity Error flag Overrun Error flag Parity addition enable 0 1 Disabled Enabled
cleared to 0 when read
Even parity addition/check 0 1 Odd parity Even parity
Received data bit 8
Note: As all error flags are cleared after reading do not test only a single bit with a bit-testing instruction. Figure 3.9.11 Serial Control Register (channel 1, SC1CR)
92CD54I-137
2006-01-27
TMP92CD54I
7
bit Symbol Read/Write BR0CR (00C3H) After reset 0 (Note) Always Function fixed to "0" 0 division 0: Disable 1: Enable 0 01 : T2 10 : T8 11 : T32 Setting of the divided frequency 0 +(16-K)/16 00 : T0
6
BR0ADDE
5
BR0CK1
4
BR0CK0 R/W
3
BR0S3 0
2
BR0S2 0
1
BR0S1 0
0
BR0S0 0
+(16 - K) / 16 division enable 0 1 Disabled Enabled
Input clock selection for baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
Bit symbol Read/Write After Reset BR0ADD (00C4H) Function
6
5
4
3
BR0K3 0
2
BR0K2 R/W 0
1
BR0K1 0
0
BR0K0 0
Set frequency divisor K (divided by N + (16 - K)/16)
Baud rate generator frequency divisor setting
BR0CR = 1 (UART only) BR0CR BR0ADD 0000 0001(K = 1) to 1111(K = 15) Disable * 0000(N = 16) or 0001(N = 1) Disable * 0010(N = 2) to 1111(N = 15) Disable * Divided by N + (16 - K) / 16 Divided by N BR0CR = 0 (UART and I/O interface modes) 0001(N = 1) (UART Only) to 1111(N = 15) 0000(N = 16)
*: as the N+(16-K)/16 division function is disabled in UART mode, set BR0ADDE to "0" Division by N with N=[1;2;3;...;16] Division by N+(16-K)/16 = [2+1/16 ; 2+2/16 ; ... ; 2+15/16 ; 3 ; 3+1/16 ; ... ; 15+15/16] Division by [1 ; 2 ; 2+1/16 ; 2+2/16 ; ... ; 2+15/16 ; 3 ; 3+1/16 ; ... ; 15+15/16; 16] Note 1: Set BR0CR to "1" after setting K (K = 1 to 15) to BR0ADD when + (16 - K) / 16 division function is used. Note 2: + (16 - K) / 16 division functions is possible to use in only UART mode. Set BR0CR to "0" to disable + (16 - K) / 16 division in I/O interface mode. Figure 3.9.12 Baud rate generator control (channel 0, BR0CR, BR0ADD)
92CD54I-138
2006-01-27
TMP92CD54I
7
bit Symbol BR1CR Read/Write (00CBH) After reset 0 (Note) Always Function fixed to "0"
6
BR1ADDE 0 division 0: Disable 1: Enable
5
BR1CK1 0 01 : T2 10 : T8 11 : T32
4
BR1CK0 R/W 0
3
BR1S3 0
2
BR1S2 0
1
BR1S1 0
0
BR1S0 0
+(16-K)/16 00 : T0 Setting of the divided frequency
+(16 - K) / 16 division enable 0 1 Disabled Enabled
Input clock selection for baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
Bit symbol Read/Write BR1ADD After Reset (00CCH) -
6
-
5
-
4
-
3
BR1K3 0
2
BR1K2 R/W 0
1
BR1K1 0
0
BR1K0 0
Function
Set frequency divisor K (divided by N + (16 - K)/16)
Baud rate generator frequency divisor setting
BR1CR = 1 (UART only) BR1CR BR1ADD 0000 0001(K = 1) to 1111(K = 15) Disable * 0000(N = 16) or 0001(N = 1) Disable * 0010(N = 2) to 1111(N = 15) Disable * Divided by N + (16 - K) / 16 Divided by N BR1CR = 0 (UART and I/O interface modes) 0001(N = 1) (UART Only) to 1111(N = 15) 0000(N = 16)
*: as the N+(16-K)/16 division function is disabled in UART mode, set BR1ADDE to "0" Division by N with N=[1;2;3;...;16] Division by N+(16-K)/16 = [2+1/16 ; 2+2/16 ; ... ; 2+15/16 ; 3 ; 3+1/16 ; ... ; 15+15/16] Division by [1 ; 2 ; 2+1/16 ; 2+2/16 ; ... ; 2+15/16 ; 3 ; 3+1/16 ; ... ; 15+15/16]; 16 Note 1: Set BR1CR to "1" after setting K (K = 1 to 15) to BR1ADD when + (16 - K) / 16 division function is used. Note 2: + (16 - K) / 16 division functions is possible to use in only UART mode. Set BR1CR to "0" to disable + (16 - K) / 16 division in I/O interface mode. Figure 3.9.13 Baud rate generator control (channel 1, BR1CR, BR1ADD)
92CD54I-139
2006-01-27
TMP92CD54I
7 TB7 SC0BUF (00C0H) 6 TB6 5 TB5 4 TB4 3 TB3 2 TB2 1 TB1 0 TB0 (Transmission)
7 RB7
6 RB6
5 RB5
4 RB4
3 RB3
2 RB2
1 RB1
0 RB0 (Reveiving)
Note: Prohibit Read modify write for SC0BUF. Figure 3.9.14 Serial Transmission/Receiving Buffer Registers (channel 0, SC0BUF)
7 SC0MOD1 (00C5H) Bit symbol Read/Write After Reset Function I2S0 R/W 0 IDLE2 0: Stop 1: Run 6 FDPX0 R/W 0 duplex 0: half 1: full 5 4 3 2 1 0 -
Figure 3.9.15 Serial Mode Control Register 1 (channel 0, SC0MOD1)
7 TB7 SC1BUF (00C8H)
6 TB6
5 TB5
4 TB4
3 TB3
2 TB2
1 TB1
0 TB0 (Transmission)
7 RB7
6 RB6
5 RB5
4 RB4
3 RB3
2 RB2
1 RB1
0 RB0 (Receiving)
Note: Prohibit Read modify write for SC1BUF.
Figure 3.9.16 Serial Transmission/Receiving Buffer Registers (channel 1, SC1BUF)
7 SC1MOD1 (00CDH) bit Symbol Read/Write After Reset Function I2S1 R/W 0 IDLE2 0: Stop 1: Run 6 FDPX1 R/W 0 duplex 0: half 1: full 5 4 3 2 1 0 -
Figure 3.9.17 Serial Mode Control Register 1 (channel 1, SC1MOD1)
92CD54I-140
2006-01-27
TMP92CD54I 3.9.4 Operation for each mode
(1) Mode 0 (I/O Interface Mode) This mode allows an increase in the number of I/O pins available for transmitting data to or receiving data from an external shift register. This mode includes the SCLK output mode to output synchronous clock SCLK and SCLK input external synchronous clock SCLK.
Output extension TMP92CD54I TXD SCLK Port Shift register SI SCK RCK A B C D E F G H TC74HC595 or equivalent Port S/L SCLK CLOCK RxD QH Input extension TMP92CD54I Shift register A B C D E F G H TC74HC165 or equivalent
Figure 3.9.18 Example of SCLK Output Mode Connection
Output extension TMP92CD54I TXD SCLK Port Shift register SI SCK RCK A B C D E F G H TC74HC595 or equivalent External clock
Input extension TMP92CD54I RxD SCLK Port Shift register QH CLOCK S/L A B C D E F G H TC74HC165 or equivalent External clock
Figure 3.9.19 Example of SCLK Input Mode Connection
92CD54I-141
2006-01-27
TMP92CD54I
Transmission In SCLK Output Mode 8-bit data and a synchronous clock are output on the TXD0 and SCLK0 pins respectively each time the CPU writes the data to the Transmission Buffer. When all the data has been output, INTES0 is set to 1, causing an INTTX0 interrupt to be generated.
Timing to write transmisison data
SCLK0 output TXD0 bit 0 bit 1 bit 6 bit 7
ITX0C (INTTX0 interrupt request)
Figure 3.9.20 Transmitting Operation in I/O Interface Mode (SCLK0 Output Mode)
In SCLK Input Mode, 8-bit data is output on the TXD0 pin when the SCLK0 input becomes active after the data has been written to the Transmission Buffer by the CPU. When all the data has been output, INTES0 is set to 1, causing an INTTX0 interrupt to be generated.
SCLK0 input (=0: Rising edge mode) SCLK0 input (=1: Falling edge mode) TXD0 ITX0C (INTTX0 interrupt request) bit 0 bit 1 bit 5 bit 6 bit 7
Figure 3.9.21 Transmitting Operation in I/O Interface Mode (SCLK0 Input Mode)
92CD54I-142
2006-01-27
TMP92CD54I
Receiving In SCLK Output Mode the synchronous clock is output on the SCLK0 pin and the data is shifted to Receiving Buffer 1. This is initiated when the Receive Interrupt flag INTES0 is cleared as the received data is read. When 8-bit data is received, the data is transferred to Receiving Buffer 2 (SC0BUF) following the timing shown below and INTES0 is set to 1 again, causing an INTRX0 interrupt to be generated. Setting SC0MOD0 to 1 initiates SCLK0 output.
IRX0C(INTRX0 interrupt request) SCLK0 output RXD0 bit 0 bit 1 bit 6 bit 7
Figure 3.9.22 Receiving operation in I/O Interface Mode (SCLK0 Output Mode)
In SCLK Input Mode the data is shifted to Receiving Buffer 1 when the SCLK input goes active. The SCLK input goes active when the Receive Interrupt flag INTES0 is cleared as the received data is read. When 8-bit data is received, the data is shifted to Receiving Buffer 2 (SC0BUF) following the timing shown below and INTES0 is set to 1 again, causing an INTRX0 interrupt to be generated.
SCLK0 input ( = 0: Rising Edge Mode) SCLK0 input ( = 1: Falling Edge Mdoe) RXD0 IRX0C (INTRX0 interrupt request) bit 0 bit 1 bit 5 bit 6 bit 7
Figure 3.9.23 Receiving Operation in I/O interface Mode (SCLK0 Input Mode)
Note: The system must be put in the Receive Enable state (SC0MOD0 = 1) before data can be received.
92CD54I-143
2006-01-27
TMP92CD54I
Transmission and Receiving (Full Duplex Mode) When Full Duplex Mode is used, set the Receive Interrupt Level to 0 and set enable the level of transmit interrupt. Ensure that the program which transmits the interrupt reads the receiving buffer before setting the next transmit data. The following is an example of this: Example: Channel 0, SCLK output Baud rate = 9600 bps fc = 19.6608 MHz
Main routine
INTES0 PFCR PFFC SC0MOD0 SC0MOD1 SC0CR
7 X 6 0 5 0 4 1 3 X 2 0 1 0 0 0 Set the INTTX0 level to 1. Set the INTRX0 level to 0. Set PF0, PF1 and PF2 to function as the TXD0, RXD0 and SCLK0 pins respectively Select I/O Interface Mode. Select Full Duplex Mode. Sclk_out, transmit on negative edge, receive on positive edge Baud rate = 9600 bps Enable receiving Set the transmit data and start.
- - 0 1 0
- - 0 1 0 0 0 *
- - 0 0 0 1 1 *
- - 0 0 0 1 0 *
- - 0 0 0 0 0 *
1 1 0 0 0 1 0 *
0 - 0 0 0 0 0 *
1 1 0 0 0 0 0 *
BR0CR 0 SC0MOD0 0 SC0BUF *
*
INTTX0 interrupt routine
Acc SC0BUF SC0BUF ***
Read the receiving buffer.
*
*
*
*
Set the next transmit data.
Note: X = Don't care; "-" = No change
92CD54I-144
2006-01-27
TMP92CD54I
(2) Mode 1 (7-bit UART Mode) 7-Bit UART Mode is selected by setting the Serial Channel Mode Register SC0MOD0 field to 01. In this mode a parity bit can be added. Use of a parity bit is enabled or disabled by the setting of the Serial Channel Control Register SC0CR bit; whether even parity or odd parity will be used is determined by the SC0CR setting when SC0CR is set to 1 (enabled). Setting example: When transmitting data of the following format, the control registers should be set as described below.
start bit 0 1 2 3 4 5 6 even parity stop
Transmission direction (transmission rate: 2400 bps at fc = 19.6608 MHz)
PFCR PFFC SC0MOD0 SC0CR BR0CR INTES0 SC0BUF
76543210 -------1 -------1
X0-X0101 X11XXX00 00101000 X100---- ********
Set PF0 to function as the TXD0 pin. Select 7-Bit UART Mode. Add even parity. Set the transfer rate to 2400 bps. Enable the INTTX0 interrupt and set it to Interrupt Level 4. Set data for transmission.
Note: X = Don't care; "-" = No change
(3) Mode 2 (8-Bit UART Mode) 8-Bit UART Mode is selected by setting SC0MOD0 to 10. In this mode a parity bit can be added (use of a parity bit is enabled or disabled by the setting of SC0CR); whether even parity or odd parity will be used is determined by the SC0CR setting when SC0CR is set to 1 (enabled). Setting example: When receiving data of the following format, the control registers should be set as described below.
start bit 0 1 2 3 4 5 6 7 odd parity stop
Transmission direction (transmission rate: 9600 bps at fc = 19.6608 MHz)
92CD54I-145
2006-01-27
TMP92CD54I
Main settings
PFCR SC0MOD0 SC0CR BR0CR INTES0
Acc if Acc Acc 76543210 ------0- -01X1001
X01XXX00 00011000 ----X100 SC0CR AND 00011100 0 then ERROR SC0BUF
Set PF1 to function as the RXD0 pin. Enable receiving in 8-Bit UART Mode. Add odd parity. Set the transfer rate to 9600 bps. Enable the INTTX0 interrupt and set it to Interrupt Level 4.
Interrupt processing
Check for errors. Read the received data.
Note: X = Don't care; "-" = No change
(4) Mode 3 (9-Bit UART Mode) 9-Bit UART Mode is selected by setting SC0MOD0 to 11. In this mode parity bit cannot be added. In the case of transmission the MSB (9th bit) is written to SC0MOD0. In the case of receiving it is stored in SC0CR. When the buffer is written and read, the MSB is read or written first, before the rest of the SC0BUF data. Wake-up function In 9-Bit UART Mode, the wake-up function for slave controllers is enabled by setting SC0MOD0 to 1. The interrupt INTRX0 can only be generated when = 1.
TXD
RXD
TXD
RXD
TXD
RXD
TXD
RXD
Master
Slave 1
Slave 2
Slave 3
Note: The TXD pin of each slave controller must be in Open-Drain Output Mode. Figure 3.9.24 Serial Link using Wake-up function
92CD54I-146
2006-01-27
TMP92CD54I
Protocol
Select 9-Bit UART Mode on the master and slave controllers. Set the SC0MOD0 bit on each slave controller to 1 to enable data receiving. The master controller transmits data one frame at a time. Each frame includes an 8-bit select code which identifies a slave controller. The MSB (bit 8) of the data () is set to 1.
start
bit 0
1
2
3
4
5
6
7
8 "1"
stop
Select code of slave controller
Each slave controller receives the above frame. Each controller checks the above select code against its own select code. The controller whose code matches clears its bit to 0. The master controller transmits data to the specified slave controller (the controller whose SC0MOD0 bit has been cleared to 0). The MSB (bit 8) of the data () is cleared to 0.
start
bit 0
1
2
3 Data
4
5
6
7
bit 8 "0"
stop
The other slave controllers (whose bits remain at 1) ignore the received data because their MSBs (bit 8 or ) are set to 0, disabling INTRX0 interrupts. The slave controller whose bit = 0 can also transmit to the master controller. In this way it can signal the master controller that the data transmission from the master controller has been completed.
92CD54I-147
2006-01-27
TMP92CD54I
Setting example: To link two slave controllers serially with the master controller using the internal clock 1 as the transfer clock.
TXD
RXD
TXD
RXD
TXD
RXD
Master
Slave 1 Select code 00000001
Slave 2 Select code 00001010
* Setting the master controller
Main
PFCR PFFC INTES0 SC0MOD0 SC0BUF
------01 -------1 X100X101 10101110 00000001
Set PF0 and PF1 to function as the TXD0 and RXD0 pins respectively. Enable the INTTX0 interrupt and set it to Interrupt Level 4. Enable the INTRX0 interrupt and set it to Interrupt Level 5. Set 1 as the transmission clock for 9-Bit UART Mode. Set the select code for slave controller 1.
INTTX0 interrupt
SC0MOD0 SC0BUF
0------- ********
Set TB8 to 0. Set data for transmission.
* Setting the slave controller
Main
PFCR PFFC INTES0 SC0MOD0
------00 -------1 X101X110 00111110
Select PF1 and PF0 to function as the RXD0 and TXD0 pins respectively (open-drain output). Enable INTRX0 and INTTX0. Set to 1 in 9-Bit UART Transmission Mode using 1 as the transfer clock.
INTRX0 interrupt Acc SC0BUF if Acc = select code then SC0MOD0 - - - 0 - - - Clear to 0.
92CD54I-148
2006-01-27
TMP92CD54I
3.10 Serial Bus Interface (SBI)
TMP92CD54I has 3-channels serial bus interface which employs a clocked-synchronous 8-bit SIO mode and an I2C bus mode. It is called SBI0, SBI1 and SBI2.
I C bus Clocked-synchronous 8-bit SIO SCL0 (PN2), SDA0 (PN1) PNODE SCK0 (PN0), SO0 (PN1), SI0 (PN2) SCL1 (PN5), SDA1 (PN4) PNODE SCK1 (PN3), SO1 (PN4), SI1 (PN5) SCL2 (P72), SDA2 (PN6) PNODE SCK2 (PM4), SO2 (PN6), SI2 (P72)
2
SBI0 SBI1 SBI2
Since each channel carries out the same operation, it explains only SBI0. The serial bus interface is connected to an external device through PN1 (SDA0) and PN2 (SCL0) in the I2C bus mode; and through PN0 (SCK0), PN1 (SO0) and PN2 (SI0) in the clocked-synchronous 8-bit SIO mode. Each pin is specified as follows.
PNODE PNCR PNFC I C Bus Mode Clocked Synchronous 8-Bit SIO Mode
2
11 XX
11X 011 010
11X 011
X: Don't care
3.10.1
Configuration
INTSBE0 Interrupt request (address / data) INTSBS0 Interrupt request (stop condition)
SCL0 SCK0
SIO Clock Control
PN0 (SCK0) Input/ Output Control Transfer Control Circuit SIO Data Control SO0 SI0 PN1 (SO0/SDA0)
T
Divider
Noise Canceller
I C bus Clock Sync. + Control
2
Shift Register
I C bus Data Control Nosie Canceller SDA0
2
PN2 (SI0/SCL0)
SBI0CR2/ SBI0SR SBI0 Control Register 2/ SBI0 Status Register
I2C0AR I2C bus 0 Address Register
SBI0DBR SBI0 Data Buffer Register
SBI0CR1 SBI0 Control Register 1
SBI0BR0, 1 SBI0 baud rate Ragister 0, 1
Figure 3.10.1 Serial Bus Interface 0 (SBI0)
92CD54I-149
2006-01-27
TMP92CD54I 3.10.2 Serial Bus Interface (SBI) Control
The following registers are used to control the serial bus interface and monitor the operation status. * * * * * * * Serial bus interface 0 control register 1 (SBI0CR1) Serial bus interface 0 control register 2 (SBI0CR2) Serial bus interface 0 data buffer register (SBI0DBR) I2C bus 0 address register (I2C0AR) Serial bus interface 0 status register (SBI0SR) Serial bus interface 0 baud rate register 0 (SBI0BR0) Serial bus interface 0 baud rate register 1 (SBI0BR1)
The above registers differ depending on a mode to be used. Refer to Section "3.10.4 I2C bus Mode Control" and "3.10.7 Clocked-synchronous 8-bit SIO Mode Control".
2
3.10.3
The Data Formats in the I C Bus Mode
The data formats in the I2C bus mode are shown below.
(a) Addressing format 8 bits S
Slave address
1
RA WK
1 to 8 bits Data
1 A C K 1 or more
1 to 8 bits Data
1 A CP K
/C
1 (b) Addressing format (with restart) 8 bits S
Slave address
1
RA WK
1 to 8 bits Data 1 or more
1 A CS K
8 bits
Slave address
1
RA WK
1 to 8 bits Data 1 or more
1 A CP K
/C
/C
1
1
(c) Free data format (data transferred from master device to slave device) 8 bits S
Data
1 A C K
1 to 8 bits Data
1 A C K 1 or more
1 to 8 bits Data
1 A CP K
1 Note: S: Start condition R / W: Direction bit ACK: Acknowledge bit P: Stop condition
Figure 3.10.2 Data Format in the I C Bus Mode
2
92CD54I-150
2006-01-27
TMP92CD54I 3.10.4 I C Bus Mode Control Register
The following registers are used to control and monitor the operation status when using the serial bus interface (SBI) in the I2C bus mode.
Seirial Bus Interface 0 Conrol Register 1
2
7
SBI0CR1 Bit Symbol (0170H) Read/Write After Reset BC2
6
BC1 W
5
BC0
4
ACK R/W
3
SCK3
2
SCK2 W
1
SCK1
0
SWRMON/ SCK0
R/W
0 0 Number of transferred bits (Note 1)
0
Function
Prohibit Readmodify-write
0 1 0 0 1/0(Note3) Acknowledge Internal serial clock selection and software reset mode monitor specification (Note 2) 0: Not generate 1: Generate
Internal serial clock selection @ write 0001 - n=6 CPU clock: fc = 20 MHz 0010 - n=7 internal SCL output 0011 75.8 kHz n=8 fc [ Hz ] ) ( fscl = n 0100 38.5 kHz n=9 2 +8 0101 n = 10 19.4 kHz 0110 n = 11 9.73 kHz ( fscl = fc/50 [ Hz ] ) Fast 1000 400 kHz 1111 Standard 100 kHz ( fscl = fc/200 [ Hz ] ) other (reserved) Software reset state monitor @ read 0 1 During software reset Initial data
Acknowledge mode specification 0 1 Not generate clock pulse for acknowledge signal Generate clock pulse for acknowledge signal
Number of bits transferred = 0 000 001 010 011 100 101 110 111
Number of clock pulses
= 1
Number of clock pulses
Bits 8 1 2 3 4 5 6 7
Bits 8 1 2 3 4 5 6 7
8 1 2 3 4 5 6 7
9 2 3 4 5 6 7 8
Note 1: Set the to "000" before switching to a clock-synchronous 8-bit SIO mode. Note 2: For the frequency of the SCL line clock, see 3.10.5 (3) Serial clock. Note 3: Initial data of SCK0 is "0", SWRMON is "1".
Figure 3.10.3 Registers for the I C Bus Mode
2
92CD54I-151
2006-01-27
TMP92CD54I
Serial Bus Interface 0 Control Register 2
7
SBI0CR2 (0173H) Bit Symbol Read/Write After Reset
Prohibit Readmodify-write
6
TRX W 0
Transmitter/ Receiver selection
5
BB 0
Start/Stop generation
4
PIN 1
Cancel INTSBE0 interrupt request
3
SBIM1 0 W (Note 1)
2
SBIM0 0
1
SWRST1 0 W (Note 1)
0
SWRST0 0
MST 0
Master/Slave selection
Function
Serial bus interface operating Software reset generate write "10" and "01", then an internal mode selection (note 2) reset signal is generated. 00: Port Mode 01: SIO Mode 2 10: I C Bus Mode 11: (reserved)
Serial bus interface operating mode selection (Note 2) 00 Port Mode (Serial Bus Interface output disabled) 01 Clocked Synchronous 8-Bit SIO Mode 2 10 I C Bus Mode 11 (reserved) INTSBE0 interrupt request 0 1 - Cancel interrupt request
Start / stop generation 0 1 Generates the stop condition Generates the start condition
Transmitter / receiver selection 0 1 Receiver Transmitter
Master / Slave selection 0 1 Slave Master
Note1: Reading this register function as SBI0SR register. Note2: Switch a mode to port mode after confirming that the bus is free. 2 Switch a mode between I C bus mode and clock-synchronous 8-bit SIO mode after confirming that input signals via port are high-level. Figure 3.10.4 Registers for the I C Bus Mode
2
92CD54I-152
2006-01-27
TMP92CD54I
Serial Bus Interface 0 Status Register
7
SBI0SR (0173H) Bit Symbol Read/Write After reset 0 Master/ Slave status monitor MST
6
TRX
5
BB
4
PIN R 1 INTSBE0 interrupt request monitor
3
AL 0 Arbitration lost detection monitor 0: - 1: Detected
2
AAS 0 Slave address match detection monitor 0: Undetected 1: Detected
1
AD0 0 GENERAL CALL detection monitor 0: Undetected 1: Detected
0
LRB 0 Last received bit monitor 0: "0" 1: "1"
Function
Prohibit Readmodify-write
0 0 2 Transmitter/ I C bus Receiver status status monitor monitor
Last received bit monitor 0 1 Last received bit was "0" Last received bit was "1"
GENERAL CALL detection monitor 0 1 Undetected GENERAL CALL detected
Slave address match detection monitor 0 1 Undetected Slave address match or GENERAL CALL detected
Arbitration lost detection monitor 0 1 - Arbitration lost
INTSBE0 interrupt request monitor 0 1
2
Interrupt requested Interrupt canceled
I C bus status monitor 0 1 Free Busy (Note2)
Transmitter / receiver status monitor 0 1 Receiver Transmitter
Master / Slave status monitor 0 Slave Note1: Writing in this register functions as SBI0CR2. 1 Master Note2: If SBI0SR drops down from 1 to 0 (falling edge), INTSBS0 will be generated in both case of Master mode and Slave mode.
Figure 3.10.5 Registers for the I C Bus Mode
2
92CD54I-153
2006-01-27
TMP92CD54I
Serial Bus Interface 0 Baud Rate Register 0
7
SBI0BR0 (0174H)
Prohibit Readmodify-write
6
I2SBI0 R/W 0 IDLE2 0: Stop 1: Run
5
-
4
-
3
-
2
-
1
-
0
-
Bit Symbol Read/W rite After Reset Function
W 0
(Note) Fixed to "0"
Operation during IDLE 2 Mode 0 1 Serial Bus Interface 0 Baud Rate Register 1 Stop Operate
7
SBI0BR1 (0175H) Bit Symbol Read/W rite After Reset Function P4MON/ P4EN R/W 0 Internal clock 0: Stop 1: Operate
6
-
5
-
4
-
3
-
2
-
1
-
0
-
-
-
-
-
-
-
-
Baud rate clock control 0 1 Sirial Bus Interface 0 Data Buffer Register Stop Operate
7
SBI0DBR (0171H) Bit Symbol Read/W rite RB7/TB7
6
RB6/TB6
5
RB5/TB5
4
RB4/TB4
3
RB3/TB3
2
RB2/TB2
1
RB1/TB1
0
RB0/TB0
Prohibit After Reset Readmodify-write
R (received)/W (transfer) Undefined
Note: W hen writing transmitted data, start from the MSB (bit 7).
2
I C Bus 0 Address Register
7
Bit Symbol I2C0AR (0172H)
Prohibit Readmodify-write
6
SA5 0
5
SA4 0
4
SA3 W 0
3
SA2 0
2
SA1 0
1
SA0 0
0
ALS 0 Addressing or free data format
SA6 0
Read/W rite After Reset Function
Slave address selection for when device is operating as slave device
Address recognition mode specification 0 1 Addressing format Free data format
Addressing or free data format impact both slave and master configuration. When addressing format is used (=0), TRX bit is updated relying on R/W bit (=8th bit of first received byte after start condition). Moreover in slave mode, MCU spies the bus after start condition to recognize its address. When free data format is used (=1) all words on the bus are considered as data words, that means no address recognition is done and TRX is not updated.
Figure 3.10.6 Registers for the I C Bus Mode
2
92CD54I-154
2006-01-27
TMP92CD54I
Seirial Bus Interface 1 Conrol Register 1
7
SBI1CR1 Bit symbol (0178H) Read/Write After Reset
Prohibit Readmodify-write
6
BC1 W
5
BC0
4
ACK R/W
3
SCK3
2
SCK2 W
1
SCK1
0
SWRMON/ SCK0
BC2
R/W
Function
0 0 Number of transferred bits (Note 1)
0
0 1 0 0 1/0(Note3) Acknowledge Internal serial clock selection and software reset mode monitor specification (Note 2) 0: Not generate 1: Generate
Internal serial clock selection @ write n=6 - 0001 CPU clock: fc = 20 MHz n=7 - 0010 internal SCL output n=8 75.8 kHz 0011 fc n=9 38.5 kHz (fscl = 2n + 8 [ Hz ] ) 0100 n = 10 19.4 kHz 0101 n = 11 9.73 kHz 0110 400 kHz (fscl = fc/50 [ Hz ] ) 1000 Fast kHz (fscl = fc/200 [ Hz ] ) 1111 Standard 100 (reserved) other Software reset state monitor @ read 0 1 During software reset Initial data
Acknowledge mode specification 0 1 Not generate clock pulse for acknowledge signal Generate clock pulse for acknowledge signal
Number of bits transferred = 0 000 001 010 011 100 101 110 111
Number of clock pulses
= 1
Number of clock pulses
Bits 8 1 2 3 4 5 6 7
Bits 8 1 2 3 4 5 6 7
8 1 2 3 4 5 6 7
9 2 3 4 5 6 7 8
Note 1: Set the to "000" before switching to a clock-synchronous 8-bit SIO mode. Note 2: For the frequency of the SCL line clock, see 3.10.5 (3) Serial clock. Note 3: Initial data of SCK0 is "0", SWRMON is "1".
2
Figure 3.10.7 Registers for the I C Bus Mode
92CD54I-155
2006-01-27
TMP92CD54I
Serial Bus Interface 1 Control Register 2
7
SBI1CR2 (017BH) Bit symbol Read/Write After Reset
Prohibit Readmodify-write
6
TRX W 0
Transmitter/ Receiver selection
5
BB 0
Start/Stop generation
4
PIN 1
Cancel INTSBE1 interrupt request
3
SBIM1 0 W (Note 1)
2
SBIM0 0
1
SWRST1 0 W (Note 1)
0
SWRST0 0
MST 0
Master/Slave selection
Function
Serial bus interface operating Software reset generate write mode selection (note 2) "10" and "01", then an internal 00: Port Mode reset signal is generated. 01: SIO Mode 2 10: I C Bus Mode 11: (reserved)
Serial bus interface operating mode selection (Note 2) 00 Port Mode (Serial Bus Interface output disabled) 01 Clocked Synchronous 8-Bit SIO Mode 2 10 I C Bus Mode 11 (reserved) INTSBE1 interrupt request 0 1 - Cancel interrupt request
Start / stop generation 0 1 Generates the stop condition Generates the start condition
Transmitter / receiver selection 0 1 Receiver Transmitter
Master / Slave selection 0 1 Slave Master
Note1: Reading this register function as SBI1SR register. Note2: Switch a mode to port mode after confirming that the bus is free. 2 Switch a mode between I C bus mode and clock-synchronous 8-bit SIO mode after confirming that input signals via port are high-level. Figure 3.10.8 Registers for the I C Bus Mode
2
92CD54I-156
2006-01-27
TMP92CD54I
Serial Bus Interface 1 Status Register
7
SBI1SR (017BH) Bit Symbol Read/Write After reset
Prohibit Readmodify-write
6
TRX
5
BB
4
PIN R 1 INTSBE1 interrupt request monitor
3
AL 0 Arbitration lost detection monitor 0: - 1: Detected
2
AAS 0 Slave address match detection monitor 0: Undetected 1: Detected
1
AD0 0 GENERAL CALL detection monitor 0: Undetected 1: Detected
0
LRB 0 Last received bit monitor 0: "0" 1: "1"
MST 0 Master/ Slave status monitor
Function
0 0 2 Transmitter/ I C bus status Receiver monitor status monitor
Last received bit monitor 0 1 Last received bit was "0" Last received bit was "1"
GENERAL CALL detection monitor 0 1 Undetected GENERAL CALL detected
Slave address match detection monitor 0 1 Undetected Slave address match or GENERAL CALL detected
Arbitration lost detection monitor 0 1 - Arbitration lost
INTSBE1 interrupt request monitor 0 1
2
Interrupt requested Interrupt canceled
I C bus status monitor 0 1 Free Busy (Note2)
Transmitter / receiver status monitor 0 1 Receiver Transmitter
Master / Slave status monitor 0 Slave Note1: Writing in this register functions as SBI1CR2. 1 Master Note2: If SBI1SR drops down from 1 to 0 (falling edge), INTSBS1 will be generated in both case of Master mode and Slave mode.
Figure 3.10.9 Registers for the I C Bus Mode
2
92CD54I-157
2006-01-27
TMP92CD54I
Serial Bus Interface 1 Baud Rate Regster 0
7
SBI1BR0 (017CH) Bit Symbol Read/W rite W 0
(Note) Fixed to "0"
6
I2SBI0 R/W 0 IDLE2 0: Stop 1: Run
5
-
4
-
3
-
2
-
1
-
0
-
After Reset Prohibit Readmodify-write Function
Operation during IDLE 2 Mode 0 1 Serial Bus Interface 1 Baud Rate Register 1 Stop Operate
7
SBI1BR1 (017DH) Bit symbol Read/W rite After Reset Function P4MON/ P4EN R/W 0 Internal clock 0: Stop 1: Operate
6
-
5
-
4
-
3
-
2
-
1
-
0
-
-
-
-
-
-
-
-
Baud rate clock control 0 1 Sirial Bus Interface 1 Data Buffer Register Stop Operate
7
SBI1DBR (0179H) Bit symbol Read/W rite RB7/TB7
6
RB6/TB6
5
RB5/TB5
4
RB4/TB4
3
RB3/TB3
2
RB2/TB2
1
RB1/TB1
0
RB0/TB0
R (received)/W (transfer)
After Reset Undefined Prohibit Readmodify-write Note: W hen writing transmitted data, start from the MSB (bit 7).
2
I C Bus 1 Address Register
7
I2C1AR (017AH) Bit Symbol Read/W rite 0 SA6
6
SA5 0
5
SA4 0
4
SA3 W 0
3
SA2 0
2
SA1 0
1
SA0 0
0
ALS 0 Addressing or free data format
After Reset Prohibit Readmodify-write Function
Slave address selection for when device is operating as slave device
Address recognition mode specification 0 1 Addressing format Free data format
Addressing or free data format impact both slave and master configuration. When addressing format is used (=0), TRX bit is updated relying on R/W bit (=8th bit of first received byte after start condition). Moreover in slave mode, MCU spies the bus after start condition to recognize its address. When free data format is used (=1) all words on the bus are considered as data words, that means no address recognition is done and TRX is not updated.
Figure 3.10.10 Registers for the I C Bus Mode
2
92CD54I-158
2006-01-27
TMP92CD54I
Seirial Bus Interface 2 Conrol Register 1
7
SBI2CR1 Bit symbol (0180H) Read/Write After Reset
Prohibit Readmodify-write
6
BC1 W
5
BC0
4
ACK R/W
3
SCK3
2
SCK2 W
1
SCK1
0
SWRMON/ SCK0
BC2
R/W
Function
0 0 Number of transferred bits (Note 1)
0
0 1 0 0 1/0(Note3) Acknowledge Internal serial clock selection and software reset mode monitor specification (Note 2) 0: Not generate 1: Generate
Internal serial clock selection @ write 0001 n=6 - CPU clock: fc = 20 MHz 0010 n=7 - internal SCL output 0011 n=8 75.8 kHz fc 0100 n=9 38.5 kHz (fscl = 2n + 8 [ Hz ] ) 0101 n = 10 19.4 kHz 0110 n = 11 9.73 kHz Fast 1000 400 kHz (fscl = fc/50 [ Hz ] ) 1111 Standard 100 kHz (fscl = fc/200 [ Hz ] ) other (reserved) Software reset state monitor @ read 0 1 During software reset Initial data
Acknowledge mode specification 0 1 Not generate clock pulse for acknowledge signal Generate clock pulse for acknowledge signal
Number of bits transferred = 0 000 001 010 011 100 101 110 111
Number of clock pulses
= 1
Number of clock pulses
Bits 8 1 2 3 4 5 6 7
Bits 8 1 2 3 4 5 6 7
8 1 2 3 4 5 6 7
9 2 3 4 5 6 7 8
Note 1: Set the to "000" before switching to a clock-synchronous 8-bit SIO mode. Note 2: For the frequency of the SCL line clock, see 3.10.5 (3) Serial clock. Note 3: Initial data of SCK0 is "0", SWRMON is "1".
2
Figure 3.10.11 Registers for the I C Bus Mode
92CD54I-159
2006-01-27
TMP92CD54I
Serial Bus Interface 2 Control Register 2
7
SBI2CR2 (0183H) Bit symbol Read/Write After Reset
Prohibit Readmodify-write
6
TRX W 0
Transmitter/ Receiver selection
5
BB 0
Start/Stop generation
4
PIN 1
Cancel INTSBE1 interrupt request
3
SBIM1 0 W (Note 1)
2
SBIM0 0
1
SWRST1 0 W (Note 1)
0
SWRST0 0
MST 0
Master/Slave selection
Function
Serial bus interface operating Software reset generate write mode selection (note 2) "10" and "01", then an internal 00: Port Mode reset signal is generated. 01: SIO Mode 2 10: I C Bus Mode 11: (reserved)
Serial bus interface operating mode selection (Note 2) 00 Port Mode (Serial Bus Interface output disabled) 01 Clocked Synchronous 8-Bit SIO Mode 2 10 I C Bus Mode 11 (reserved) INTSBE1 interrupt request 0 1 - Cancel interrupt request
Start / stop generation 0 1 Generates the stop condition Generates the start condition
Transmitter / receiver selection 0 1 Receiver Transmitter
Master / Slave selection 0 1 Slave Master
Note1: Reading this register function as SBI2SR register. Note2: Switch a mode to port mode after confirming that the bus is free. 2 Switch a mode between I C bus mode and clock-synchronous 8-bit SIO mode after confirming that input signals via port are high-level. Figure 3.10.12 Registers for the I C Bus Mode
2
92CD54I-160
2006-01-27
TMP92CD54I
Serial Bus Interface 2 Status Register
7
SBI2SR (017BH) Bit Symbol Read/Write After reset
Prohibit Readmodify-write
6
TRX
5
BB
4
PIN R 1 INTSBE1 interrupt request monitor
3
AL 0 Arbitration lost detection monitor 0: - 1: Detected
2
AAS 0 Slave address match detection monitor 0: Undetected 1: Detected
1
AD0 0 GENERAL CALL detection monitor 0: Undetected 1: Detected
0
LRB 0 Last received bit monitor 0: "0" 1: "1"
MST 0 Master/ Slave status monitor
Function
0 0 2 Transmitter/ I C bus status Receiver monitor status monitor
Last received bit monitor 0 1 Last received bit was "0" Last received bit was "1"
GENERAL CALL detection monitor 0 1 Undetected GENERAL CALL detected
Slave address match detection monitor 0 1 Undetected Slave address match or GENERAL CALL detected
Arbitration lost detection monitor 0 1 - Arbitration lost
INTSBE1 interrupt request monitor 0 1
2
Interrupt requested Interrupt canceled
I C bus status monitor 0 1 Free Busy (Note2)
Transmitter / receiver status monitor 0 1 Receiver Transmitter
Master / Slave status monitor 0 Slave Note1: Writing in this register functions as SBI2CR2. 1 Master Note2: If SBI2SR drops down from 1 to 0 (falling edge), INTSBS2 will be generated in both case of Master mode and Slave mode.
Figure 3.10.13 Registers for the I C Bus Mode
2
92CD54I-161
2006-01-27
TMP92CD54I
Serial Bus Interface 2 Baud Rate Regster 0
7
SBI2BR0 (0184H) Bit Symbol Read/W rite W 0
(Note) Fixed to "0"
6
I2SBI0 R/W 0 IDLE2 0: Stop 1: Run
5
-
4
-
3
-
2
-
1
-
0
-
After Reset Prohibit Readmodify-write Function
Operation during IDLE 2 Mode 0 1 Serial Bus Interface 2 Baud Rate Register 1 Stop Operate
7
SBI2BR1 (0185H) Bit symbol Read/W rite After Reset Function P4MON/ P4EN R/W 0 Internal clock 0: Stop 1: Operate
6
-
5
-
4
-
3
-
2
-
1
-
0
-
-
-
-
-
-
-
-
Baud rate clock control 0 1 Sirial Bus Interface 2 Data Buffer Register Stop Operate
7
SBI2DBR (0181H) Bit symbol Read/W rite RB7/TB7
6
RB6/TB6
5
RB5/TB5
4
RB4/TB4
3
RB3/TB3
2
RB2/TB2
1
RB1/TB1
0
RB0/TB0
R (received)/W (transfer)
After Reset Undefined Prohibit Readmodify-write Note: W hen writing transmitted data, start from the MSB (bit 7).
2
I C Bus 2 Address Register
7
I2C2AR (0182H) Bit Symbol Read/W rite 0 SA6
6
SA5 0
5
SA4 0
4
SA3 W 0
3
SA2 0
2
SA1 0
1
SA0 0
0
ALS 0 Addressing or free data format
After Reset Prohibit Readmodify-write Function
Slave address selection for when device is operating as slave device
Address recognition mode specification 0 1 Addressing format Free data format
Addressing or free data format impact both slave and master configuration. When addressing format is used (=0), TRX bit is updated relying on R/W bit (=8th bit of first received byte after start condition). Moreover in slave mode, MCU spies the bus after start condition to recognize its address. When free data format is used (=1) all words on the bus are considered as data words, that means no address recognition is done and TRX is not updated.
Figure 3.10.14 Registers for the I C Bus Mode
2
92CD54I-162
2006-01-27
TMP92CD54I 3.10.5 Control in I C Bus Mode
To operate the device in the acknowledge mode set the SBI0CR1 to "1". When operating in the master mode this device generates an additional clock pulse as an acknowledge signal; when operating in the slave mode it counts a clock pulse as an acknowledge signal. In the transmitter mode the SDA0 pin is released during the clock pulse cycle so that it can receive the acknowledge signal from the receiver. In the receiver mode the SDA0 pin is set to the low-level during the clock pulse cycle in order to generate the acknowledge signal. To operate the device in non-acknowledge mode, clear the SBI0CR1 to "0". When operating in the master mode this device does not generate a clock pulse as an acknowledge signal; when operating in the slave mode it does not count a clock pulse as an acknowledge signal. (2) Number of transfer bits The SBI0CR1 setting determines the number of data bits to be transmitted or received. Since the SBI0CR1 is cleared to "000" on start-up, a slave address and direction bit transmissions are executed in 8 bits. Other than these, the retains a specified value. (3) Serial clock i) Clock source The SBI0CR1 is used to specify the maximum transfer frequency for output on the SCL0 pin in the master mode.
2
(1) Specifying acknowledge mode
tHIGH
tLOW
1/fscl
Formula tLOW = 2 / fc n-1 tHIGH = 2 / fc + 8 / fc fscl = 1 / (tLOW + tHIGH) n = fc / (2 + 8) tLOW fscl tLOW fscl = 32 / fc, tHIGH = 18 / fc = fc / 50 = 100 / fc, tHIGH = 100 / fc = fc / 200
n-1
SBI0CR1 0011 0100 0101 0110 1000 1111
n 8 9 10 11 - -
Figure 3.10.15 Clock Source
92CD54I-163
2006-01-27
TMP92CD54I
ii) Clock synchronization In the I2C bus mode, in order to wired-AND a bus, a master device which pulls down a clock line to the low-level, in the first place, invalidate a clock pulse of another master device which generates a high-level clock pulse. The master device with a high-level clock pulse needs to detect the situation and implement the following procedure. This device has a clock synchronization function which allows normal data transfer even when more than one master exists on the bus. The following example explains the clock synchronization procedures used when there are two masters present on the bus.
Wait counting high-level width of a clock pulse Start couting high-level width of a clock pulse Internal SCL0 output (Master A) Internal SCL0 output (Master B) SCL0 line a b c Reset a counter of high-level width of a clock pulse
Figure 3.10.16 Clock Synchronization
When Master A pulls the internal SCL0 output to the low-level at point "a", the SCL0 line of the bus goes to the low-level. After detecting this, Master B resets a counter of high-level width of an own clock pulse and sets the internal SCL0 output the low-level. Master A finishes counting low-level width of an own clock pulse at point "b" and sets the internal SCL0 output to the high-level. Since Master B is holding the SCL0 line of the bus at the low-level, Master A waits for counting high-level width of an own clock pulse. After Master B has finished counting low-level width of an own clock pulse at point "c" and Master A detects the SCL0 line of the bus at the high-level, and starts counting high-level of an own clock pulse. The clock pulse on the bus is determined by the master device with the shortest high-level width and the master device with the longest low-level width from among those master devices connected to the bus. (4) Slave address and address recognition mode specification When this device is to be used as an I2C slave device, set the slave address and in I2C0AR. Clear the to "0" for addressing format. When this devices is to be used as an I2C master device, clear to "0" for addressing format. When this device is tu be used in free data format system (as slave or master) set to "1" for free data format. (5) Master/slave selection To operate this device as a master device set the SBI0CR2 to "1". To operate it as a slave device clear the SBI0CR2 to "0". The is cleared to "0" in hardware when a stop condition is detected on the bus or when arbitration is lost.
92CD54I-164
2006-01-27
TMP92CD54I
(6) Transmitter/receiver selection To operate this device as a transmitter set the SBI0CR2 to "1". To operate it as a receiver clear the SBI0CR2 to "0". When data with an addressing format is transferred in the slave mode, when a slave address with the same value that an I2C0AR or a GENERAL CALL is received (all 8-bit data are "0" after a start condition), the is set to "1" in hardware if the direction bit ( R / W ) sent from the master device is "1", and is cleared to "0" in hardware if the bit is "0". In the master mode, when an acknowledge signal is returned from the slave device, the is cleared to "0" in hardware if the value of the transmitted direction bit is "1", and is set to "1" in hardware if the value of the bit is "0". If an acknowledge signal is not returned, the current state is maintained. The is cleared to "0" in hardware when a stop condition is detected on the I2C bus or when arbitration is lost.
(7) Start/Stop condition generation When the SBI0SR = "0", 8-bit data set in SBI0DBR is output on the bus after generating a start condition by writing "1111" to the SBI0CR2 . It is necessary to set transmitted data to the data buffer register (SBI0DBR) and set "1" to the beforehand.
SCL0 line
1
2
3
4
5
6
7
8
9
SDA0 line Start condition
A6
A5
A4
A3
A2
A1
A0
R/W Acknowledge signal
Slave address and the direction bit
Figure 3.10.17 Start Condition Generation and Slave Address Generation
When the SBI0SR = "1", the sequence for generating a stop condition can be initiated by writing "111" to the SBI0CR2 and writing "0" to the SBI0CR2. Do not modify the contents of the SBI0CR2 until a stop condition has been generated on the bus.
SCL0 line SDA0 line Stop condition
Figure 3.10.18 Stop Condition Generation
The state of the bus can be ascertained by reading the contents of the SBI0SR. The SBI0SR will be set to "1" if a start condition has been detected on the bus ,and will be cleared to "0" if a stop condition has been detected. If SBI0SR drops down from 1 to 0 (falling edge), INTSBS0 will be generated in both case of Master mode and Slave mode.
92CD54I-165
2006-01-27
TMP92CD54I
(8) Interrupt service requests and interrupt cancellation When a serial bus interface interrupt request 0 by transfer of the slave address or the data (INTSBE0) is generated, the SBI0SR is cleared to "0". The SCL0 line is pulled down to the low-level while the = "0". The is cleared to "0" when a single word of data is transmitted or received. Either writing data to or reading data from SBI0DBR sets the to "1". The time from the being set to "1" until the release of the SCL0 line is tLOW. In the address recognition mode (i.e. when = "0"; Addressing format), the is cleared to "0" when the slave address matches the value set in I2C0AR or when a GENERAL CALL is received (all 8-bit data are "0" after a start condition). Although the SBI0CR2 can be set to "1" by a program, writing "0" to the SBI0CR2 does not clear it to "0". (9) Serial bus interface operation mode selection The SBI0CR2 is used to specify the serial bus interface operation mode. Set the SBI0CR2 to "10" when the device is to be used in I2C Bus Mode. Switch to port mode confirming that the bus is free. (10) Arbitration lost detection monitor Since more than one master device can exist simultaneously on the bus in I2C Bus Mode, a bus arbitration procedure has been implemented in order to guarantee the integrity of transferred data. Data on the SDA0 line is used for I2C bus arbitration. The following example illustrates the bus arbitration procedure when there are two master devices on the bus. Master A and Master B output the same data until point "a". After Master A outputs "L" and Master B, "H", the SDA0 line of the bus is wire-AND and the SDA0 line is pulled down to the low level by Master A. When the SCL0 line of the bus is pulled up at point "b", the slave device reads the data on the SDA0 line, that is, data in Master A. Data transmitted from Master B becomes invalid. The Master B state is known as "ARBITRATION LOST". Master B device which loses arbitration releases the internal SDA0 output in order not to affect data transmitted from other masters with arbitration. When more than one master sends the same data at the first word, arbitration occurs continuously after the second word.
SCL0 line Internal SDA0 output (Master A) Internal SDA0 output (Master B) SDA0 line a b Internal SDA0 output becomes "1" after arbitration has been lost.
Figure 3.10.19 Arbitration Lost
92CD54I-166
2006-01-27
TMP92CD54I
This device compares the levels on the bus's SDA0 line with those of the internal SDA0 output on the rising edge of the SCL0 line. If the levels do not match, arbitration is lost and the SBI0SR is set to "1". When the is set to "1", the SBI0SR are cleared to "00" and the mode is switched to a slave receiver mode. This device generates the clock pulse until data is transmitted when the is "1". The is cleared to "0" when data is written to or read from SBI0DBR or when data is written to SBI0CR2.
Internal SCL0 output Internal SDA0 output Internal SCL0 output Internal SDA0 output 1 2 3 4 5 6 7 8 9 1 2 3 4
Master A
D7A
D6A
D5A
D4A
D3A
D2A
D1A
D0A
D7A' D6A' D5A' D4A'
Stop the clock pulse 1 2 3
Master B
D7B
D6B
Keep Internal SDA0 output to high-level as losing arbitration

Accessed to SBI0DBR or SBI0CR2
Figure 3.10.20 Example of a Master Device B (D7A = D7B, D6A = D6B)
(11) Slave address match detection monitor The SBI0SR is set to "1" in the slave mode, in the address recognition mode (i.e. when the I2C0AR = "0"), when a GENERAL CALL is received, or when a slave address matches the value set in I2C0AR. When the I2C0AR = "1", the SBI0SR is set to "1" after the first word of data has been received. The SBI0SR is cleared to "0" when data is written to or read from the data buffer register SBI0DBR. (12) GENERAL CALL detection monitor The SBI0SR is set to "1" in the slave mode, when a GENERAL CALL is received (all 8-bit received data is "0", after a start condition). The SBI0SR is cleared to "0" when a start condition or stop condition is detected on the bus. (13) Last received bit monitor The value on the SDA0 line detected on the rising edge of the SCL0 line is stored in the SBI0SR. In the acknowledge mode, immediately after an INTSBE0 interrupt request has been generated, an acknowledge signal is read by reading the contents of the SBI0SR.
92CD54I-167
2006-01-27
TMP92CD54I
(14) Software Reset function The software Reset function is used to initialize the SBI circuit, when SBI is rocked by external noises, etc. An internal Reset signal pulse can be generated by setting SBI0CR2 to "10" and "01". This initializes the SBI circuit internally. All control registers and status registers excluding SBI0CR2 are initialized as well. The SBI0CR2 is automatically cleared to "00" after the SBI circuit has been initialized. The initialization of SBI circuit can be confirmed by monitoring SBI0CR1. (15) Serial Bus Interface Data Buffer Register (SBI0DBR) The received data can be read and the transferred data can be writtenby reading or writing the SBI0DBR. When the start condition has been generated in the master mode, the slave address and the direction bit are set in this register. (16) I2C Bus Address Register (I2C0AR) I2C0AR is used to set the slave address when this device functions as a slave device. ALS bit is used to select between addressing and free data format. - For I2C bus, addressing format is used (=0) ; then TRX bit is updated relying on R/W bit (=8th bit of first received byte after start condition). Moreover, in slave mode, MCU spies the bus after start condition to recognize its address - For free data format (ALS=1) all words on the bus are considered as data words, that means no address recognition is done and TRX is not updated (17) Baud Rate Register (SBI0BR1) Write "1" to the SBI0BR1 before operation commences. (18) Setting register for IDLE2 mode operation (SBI0BR0) The setting of SBI0BR0 determines whether the device is operating or is stopped in IDLE2 Mode. Therefore, setting is necessary before the HALT instruction is executed.
92CD54I-168
2006-01-27
TMP92CD54I 3.10.6
(1)
Data Transfer in I2C Bus Mode
Device Initialization Set the SBI0BR1 and the SBI0CR1. Set the SBI0BR1 to "1" and clear bits 7 to 5 and 3 of the SBI0CR1 to "0". Set a slave address in I2C0AR and the I2C0AR ( = "0" when an addressing format.) For specifying the default setting to a slave receiver mode, clear "000" to the , set "1" to the , set "10" to the and set "00" to the .
(2)
Start Condition Generation and Slave Address Generation i) Master mode In the master mode the start condition and the slave address are generated as follows. Check a bus free status (when = "0"). Set the SBI0CR1 to "1" (acknowledge mode) and specify a slave address and a direction bit to be transmitted to the SBI0DBR. When the is "0", the start condition is generated by writing "1111" to the SBI0CR2. Subsequently to the start condition, nine clocks are output from the SCL0 pin. The slave address and the direction bit set to the SBI0DBR will be outputting during the 8 clocks. At the 9th clock pulse the SDA0 line is released and the acknowledge signal is received from the slave device. An INTSBE0 interrupt request occurs on the falling edge of the ninth clock pulse. The is cleared to "0". In the master mode the SCL0 pin is pulled down to the low-level while the is "0". When an INTSBE0 interrupt request occurs, the value of is changed according to the direction bit setting only if the slave device returns an acknowledge signal. ii) Slave mode In the slave mode the start condition and the slave address are received. After the start condition has been received from the master device, while eight clocks are input from the SCL0 pin, the slave address and the direction bit which are output from the master device are received. When a GENERAL CALL or an address matching the slave address set in I2C0AR is received, the SDA0 line is pulled down to the low level at the 9th clock pulse and an acknowledge signal is output. An INTSBE0 interrupt request occurs on the falling edge of the ninth clock pulse. The is cleared to "0". In the slave mode the SCL0 line is pulled down to the low-level while the = "0". When an interrupt request occurs, the value of is changed according to the direction bit setting only if the slave device returns an acknowledge signal.
SCL0 SDA0
1 A6 Start condtion
2 A5
3 A4
4 A3
5 A2
6 A1
7 A0
8
R/ W
9 ACK Acknowledge signal from a slave device
Slave address + derection bit
INTSBE0 interrupt request output of Master output of Slave
Figure 3.10.21 Start Condition Generation and Slave Address Transfer
92CD54I-169
2006-01-27
TMP92CD54I
(3) 1-word Data Transfer Check the setting using an INTSBE0 interrupt process after the transfer of each word of data is completed and determine whether the device is in the master mode or the slave mode. i) When the is "1" (Master mode) Check the setting and determine whether the device is in the transmitter mode or the receiver mode. Note: TRX bit is only valid in addressing format (=0). When the is "1" (Transmitter mode) Check the setting. When the = "1", there is no receiver requesting data. Implement the process for generating a stop condition (see Section 3.10.6 (4) ) and terminate data transfer. When the = "0", the receiver is requesting new data. When the next transmitted data is 8 bits, write the transmitted data to the SBI0DBR. When the next transmitted data is other than 8 bits, set the , set the to "1" and write the transmitted data to the SBI0DBR. After the data has been written, the is set to "1", a serial clock pulse is generated to trigger transfer of the next word of data via the SCL0 pin, and the word is transmitted. After the data has been transmitted, an INTSBE0 interrupt request is generated. The is set to "0" and the SCL0 line is pulled down to the low-level. If the length of the data to be transferred is greater than one word, repeat the latter steps of the procedure, starting from the check of the setting.
Write to SBI0DBR SCL0 line 1 2 3 4 5 6 7 8 9
SDA0 line
D7
D6
D5
D4
D3
D2
D1
D0
ACK Acknowledge signal from a receive

INTSBE0 interrupt request Output from Master Output from Slave
Figure 3.10.22 Example in which = "000" and = "1" in Transmitter Mode
92CD54I-170
2006-01-27
TMP92CD54I
When the is "0" (Receiver mode) When the next transmitted data is other than 8 bits, set the again. Set the to "1" and read the received data from the SBI0DBR so as to release the SCL0 line (the value of data which is read immediately after a slave address is sent is undefined). After the data has been read, the is set to "1". This device outputs a serial clock pulse on SCL0 line to transfer new 1-word of data and outputs low-level from SDA0 pin with acknowledge timing. An INTSBE0 interrupt request is generated and the is set to "0". Then this device pulls down the SCL0 pin to the low-level. This device outputs a clock pulse for 1-word of data transfer and the acknowledge signal each time that received data is read from SBI0DBR.
Read SBI0DBR SCL0 1 2 3 4 5 6 7 8 9
SDA0
D7
D6
D5
D4
D3
D2
D1
D0
ACK
New D7
Acknowledge signal to a transmitter

INTSBE0 interrupt request
Output from Master Output from Slave
Figure 3.10.23 Example of when = "000", = "1" in Receiver Mode
In order to terminate the transmission of data to a transmitter, clear the to "0" before reading data which is 1-word before the last data to be received. The last data does not generate a clock pulse for the acknowledge signal. After the data has been transmitted and an interrupt request has been generated, set the to "001" and read the data. This device generates a clock pulse for a 1-bit data transfer. Since the master device is a receiver, the SDA0 line on a bus keeps the high-level. The transmitter receives the high-level signal as an ACK signal. The receiver indicates to the transmitter that data transfer is complete. After 1-bit data is received and an interrupt request has occurred, this device generates a stop condition (see Section 3.10.6 (4) ) and terminates data transfer. Because of a stop condition generation, an INTSBS0 interrupt request occurs.
SCL0 line 9 1 2 3 4 5 6 7 8 1
SDA0 line
D7
D6
D5
D4
D3
D2
D1
D0
Acknowledge signal sent to a transmitter

INTSBE0 interrupt request
"0" Read SBI0DBR
"001" Read SBI0DBR output of Master output of Slave
Figure 3.10.24 Termination of Data Transfer in Master Receiver Mode
92CD54I-171
2006-01-27
TMP92CD54I
ii) When the is "0" (Slave mode) In the slave mode, this device operates either in normal slave mode or in slave mode after losing arbitration. In the slave mode, an INTSBE0 interrupt request occurs when this device receives a slave address or a GENERAL CALL from the master device, or when a GENERAL CALL is received and data transfer is complete, or after matching a received slave address. In the master mode, this device operates in a slave mode if it is losing arbitration. An INTSBE0 interrupt request occurs when word data transfer terminates after losing arbitration. When an INTSBE0 interrupt request occurs, the is cleared to "0", and the SCL0 pin is pulled down to the low-level. Either reading data to or writing data from the SBI0DBR, or setting the to "1" releases the SCL0 pin after taking tLOW time . If the stop condetion is detected and SBI0SR drops down from 1 to 0, INTSBS0 will be generated. Check the SBI0SR, , and and implements processes according to conditions listed in the next table.
Note: The is set to "0" and the SCL0 pin is pulled down to the low-level, when this device as a master loses arbitration while sending slave address and is called as the slave. In the following 2 cases, the interrupt request is generated when data transfer is finished after losing arbitration, but is not set to "0". - The case that this device as a master loses arbitration while sending slave address and the slave address sent from another device does not correspond to this device. - The case that this device as a master loses arbitration while sending the data.
92CD54I-172
2006-01-27
TMP92CD54I
Table 3.10.1 Operation in the Slave Mode
1

1

1 0
Conditions
Process
This device loses arbitration when Set the number of bits in 1-word to the transmitting a slave address and and write the transmitted data receives a slave address of which the to the SBI0DBR. value of the direction bit sent from another master is "1". In the salve receiver Mode, this device receives a slave address of which the value of the direction bit sent from the master is "1". In the salve transmitter mode, 1-word Check the . If the is set to data is transmitted. "1", set the to "1" since the receiver does not request the next data. Then, clear the to "0" to release the bus. If the is cleared to "0", set the number of bits in a word to the and write transmitted data to the SBI0DBR since the receiver requests next data. This device loses arbitration when Read the SBI0DBR for setting the to transmitting a slave address and "1" (reading dummy data) or set the receives a GENERAL CALL or slave to "1". address of which the value of the direction bit sent from another master is "0". This device loses arbitration when Although INTSEBE0 interrupt occurs after transmitting a slave address or data finishing transmitting, this device is slave and terminates transferring word data. receiver mode. In this case the is not cleared to '0'. Execute the program again in the case of transmitting again as a master. In the slave receiver mode, this device Read the SBI0DBR for setting the to receives a GENERAL CALL or slave "1" (reading dummy data) or set the to "1". address of which the value of the direction bit sent from the master is "0". In the slave receiver mode, the device Set the number of bits in a word to the terminates receiving 1-word data. and read received data from the SBI0DBR.
0
1
0
0
0
0
1
1
1/0
0
0
0
1
1/0
0
1/0
92CD54I-173
2006-01-27
TMP92CD54I
(4) Stop condition generation When the SBI0SR is "1", the sequence of generating a stop condition is started by setting "111" to the SBI0CR2 and "0" to the SBI0CR2. Do not modify the contents of the SBI0CR2 until a stop condition is generated on a bus. When a SCL0 line of bus is pulled down by other devices, this device generates a stop condition after they release a SCL0 line and the SDA0 becomes "1". An INTSBS0 interrupt request occurs at the timing of the SBI0SR becomes "0" in both case of master mode and slave mode.. Whenever a stop condition is detected, an INTSBS0 interrupt request will be generated in both case of master mode and slave mode, regardless of whether it means to stop data transfer or not.
1 1 0 1 SCL0 line SDA0 line
Stop condition
(Read) INTSBS0 interrupt request
Figure 3.10.25 Stop Condition Generation
92CD54I-174
2006-01-27
TMP92CD54I
(5) Restart Restart is used during data transfer between a master device and a slave device to change the data transfer direction. The following description explains how to restart when this device is in the master mode. Clear the SBI0CR2 to "000" and set the SBI0CR2 to "1" to release the bus. The SDA0 line remains the high-level and the SCL0 pin is released. Since a stop condition is not generated on the bus, other devices assume the bus to be in a busy state. Check the SBI0SR until it becomes "0" to check that the SCL0 pin of this device is released. Check the until it becomes 1 to check that the SCL0 line on a bus is not pulled down to the low-level by other devices. After confirming that the bus stays in a free state, generate a start condition with procedure described in 3.10.6 (2). In order to meet set-up time when restarting, take at least 4.7 us of waiting time by software from the time of restarting to confirm that the bus is free until the time to generate the start condition.
0 0 0 1
Fast
1 1 1 1
: 600[ns](Min.) Standard: 4.7 [s](Min.)
Start codnition
SCL0 line Internal SCL0 output SDA0 line 9

Figure 3.10.26 Timing Diagram when Restarting
92CD54I-175
2006-01-27
TMP92CD54I 3.10.7 Clocked Synchronous 8-Bit SIO Mode control
The following registers are used to control and monitor the operation status when the serial bus interface (SBI) is being operated in clocked synchronous 8-bit SIO mode.
Serial Bus Interface 0 Control Register 1
7
SBI0CR1 Bit symbol (0170H) Read/Write After Reset
Prohibit Readmodify-write
6
SIOINH W 0
5
SIOM1 0
4
SIOM0 0
3
W 1
Note2) Write 0 to this bit.
2
SCK2 0
1
SCK1 W 0
Serial clock selection
0
SCK0 0
SIOS 0
Function
Transfer start Continue/ 0: stop abort transfer 1: start 0: Continue transfer 1: Abort transfer
Transfer mode select 00: Transmit Mode 01: (reserved) 10: Transmit/Receive Mode 11: Receive Mode
Serial clock selection @ write 000 n = 4 1.25 MHz 001 n = 5 625 kHz CPU clcok: fc 010 n = 6 313 kHz fc = 20 MHz 011 n = 7 156 kHz (output to SCK pin) 100 n = 8 78.1 kHz fc fscl = [Hz] 101 n = 9 39.1 kHz n 2 110 n = 10 19.5 kHz 111 - external clock : SCK0 Software reset state monitor @ read 0 1 During software reset Not during software reset
Transfer mode selection 00 8-bit transmit mode 01 (reserved) 10 8-bit transmit / receive mode 11 8-bit receive mode Continue / abort transfer 0 1 Continue transfer Abort transfer (automatically cleared after transfer aborted) Indicate transfer start / stop 0 1 Stop Start
Note1: Set the tranfer mode and the serial clock after setting to "0" and to "1". Note2: Write 0 to this bit in SIO mode.
Serial Bus interface 0 Data Buffer Register SBI0DBR (0171H)
Prohibit Readmodify-write
7
Bit symbol Read/Write After Reset RB7/TB7
6
RB6/TB6
5
RB5/TB5
4
RB4/TB4
3
RB3/TB3
2
RB2/TB2
1
RB1/TB1
0
RB0/TB0
R (receiver) / W (transfer) Undefined
Figure 3.10.27 Register for the SIO Mode
92CD54I-176
2006-01-27
TMP92CD54I
Serial Bus Interface 0 Control Register 2
7
SBI0CR2 (0173H)
Prohibit Readmodify-write
6
-
5
-
4
-
3
SBIM1 W 0
2
SBIM0 0
1
W 0
(Note2)
0
W 0
(Note2)
Bit symbol Read/Write After Reset Function
-
Serial bus interface operation mode selection 00: Port mode 01: SIO mode 2 10: I C bus mode 11: (reserved)
Serial bus interface operation mode selection 00 Port mode (serial bus interface output disabled) 01 Clocked-Synchronous 8-bit SIO mode 10 I C bus mode 11 (reserved)
2
Note1: Set the SBI0CR1 "000" before switching to a clocked-synchronous 8-bit SIO mode. Note2: Please always write "00" to SBI0CR2<1:0>.
Serial Bus Interface 0 Status Register
7
bit Symbol SBI0SR (0173H) Read/Write After reset Function -
6
-
5
-
4
-
3
SIOF R 0
Serial transfer operation status monitor
2
SEF 0
Shift operation status monitor
1
-
0
-
Shift operation status monitor 0 1 0 1 Shift operation terminated Shift operation in progress Transfer terminated Transfer in progress
Serial transfer operating status monitor
Figure 3.10.28 Registers for the SIO Mode
92CD54I-177
2006-01-27
TMP92CD54I
Serial B us Interface 0 Baud Rate Register 0
7
SBI0BR0 (0174H)
Prohibit Readmodify-write
6
I2SBI0 R/W 0 IDLE2 0: STOP 1: RUN
5
-
4
-
3
-
2
-
1
-
0
-
Bit symbol Read/Write After Reset Function
W 0
(Note) Fixed to "0"
Operation during IDLE 2 mode 0 1 Stop Operate
Serial Bus Interface 0 Baud Rate Register 1
7
SBI0BR1 (0175H) Bit symbol Read/Write After Reset Function P4MON/ P4EN R/W 0 Internal clock 0: Stop 1: Operate
6
-
5
-
4
-
3
-
2
-
1
-
0
-
-
-
-
-
-
-
-
Baud rate clock control 0 1 Stop Operate
Figure 3.10.29 Registers for the SIO Mode
92CD54I-178
2006-01-27
TMP92CD54I
Serial Bus Interface 1 Control Register 1
7
SBI1CR1 Bit symbol (0178H) Read/Write After Reset
Prohibit Readmodify-write
6
SIOINH W 0
5
SIOM1 0
4
SIOM0 0
3
W 1
Note2) Write 0 to this bit.
2
SCK2 0
1
SCK1 W 0
Serial clock selection
0
SCK0 0
SIOS 0
Function
Transfer start Continue/ 0: stop abort transfer 1: start 0: Continue transfer 1: Abort transfer
Transfer mode select 00: Transmit Mode 01: (reserved) 10: Transmit/Receive Mode 11: Receive Mode
Serial clock selection @ write 000 n = 4 1.25 MHz 001 n = 5 625 kHz CPU clcok: fc 010 n = 6 313 kHz fc = 20 MHz 011 n = 7 156 kHz (output to SCK pin) 78.1 kHz 100 n = 8 fc fscl = [Hz] 39.1 kHz 101 n = 9 n 2 19.5 kHz 110 n = 10 111
-
external clock : SCK1
Software reset state monitor @ read 0 1 During software reset Not during software reset
Transfer mode selection 00 8-bit transmit mode 01 (reserved) 10 8-bit transmit / receive mode 11 8-bit receive mode Continue / abort transfer 0 1 Continue transfer Abort transfer (automatically cleared after transfer aborted) Indicate transfer start / stop 0 1 Stop Start
Note1: Set the tranfer mode and the serial clock after setting to "0" and to "1". Note2: Write 0 to this bit in SIO mode.
Serial Bus interface 1 Data Buffer Register SBI1DBR (0179H)
Prohibit Readmodify-write
7
Bit symbol Read/Write After Reset RB7/TB7
6
RB6/TB6
5
RB5/TB5
4
RB4/TB4
3
RB3/TB3
2
RB2/TB2
1
RB1/TB1
0
RB0/TB0
R (receiver) / W (transfer) Undefined
Figure 3.10.30 Register for the SIO Mode
92CD54I-179
2006-01-27
TMP92CD54I
Serial Bus Interface 1 Control Register 2
7
Bit symbol SBI1CR2 (017BH)
Prohibit Readmodify-write
6
-
5
-
4
-
3
SBIM1 W 0
2
SBIM0 0
1
W 0
(Note2)
0
W 0
(Note2)
-
Read/Write After Reset Function
Serial bus interface operation mode selection 00: Port mode 01: SIO mode 2 10: I C bus mode 11: (reserved)
Serial bus interface operation mode selection 00 Port mode (serial bus interface output disabled) 01 Clocked-Synchronous 8-bit SIO mode 10 I C bus mode 11 (reserved)
2
Note1: Set the SBI1CR1 "000" before switching to a clocked-synchronous 8-bit SIO mode. Note2: Please always write "00" to SBI1CR2<1:0>.
Serial Bus Interface 1 Status Register
7
SBI1SR (017BH) bit Symbol Read/Write After reset Function -
6
-
5
-
4
-
3
SIOF R 0
Serial transfer operation status monitor
2
SEF 0
Shift operation status monitor
1
-
0
-
Shift operation status monitor 0 1 0 1 Shift operation terminated Shift operation in progress Transfer terminated Transfer in progress
Serial transfer operating status monitor
Figure 3.10.31 Registers for the SIO Mode
92CD54I-180
2006-01-27
TMP92CD54I
Serial Bus Interface 1 Baud Rate Register 0
7
SBI1BR0 (017CH) Bit symbol Read/Write W 0
(Note) Fixed to "0"
6
I2SBI1 R/W 0 IDLE2 0: STOP 1: RUN
5
-
4
-
3
-
2
-
1
-
0
-
After Reset Prohibit Readmodify-write Function
Operation during IDLE 2 mode 0 1 Stop Operate
Serial Bus Interface 1 Baud Rate Register 1
7
SBI1BR1 (017DH) Bit symbol Read/Write After Reset Function P4MON/ P4EN R/W 0 Internal clock 0: Stop 1: Operate
6
-
5
-
4
-
3
-
2
-
1
-
0
-
-
-
-
-
-
-
-
Baud rate clock control 0 1 Stop Operate
Figure 3.10.32 Registers for the SIO Mode
92CD54I-181
2006-01-27
TMP92CD54I
Serial Bus Interface 2 Control Register 1
7
SBI2CR1 Bit symbol (0180H) Read/Write After Reset
Prohibit Readmodify-write
6
SIOINH W 0
5
SIOM1 0
4
SIOM0 0
3
W 1
Note2) Write 0 to this bit.
2
SCK2 0
1
SCK1 W 0
Serial clock selection
0
SCK0 0
SIOS 0
Function
Transfer start Continue/ 0: stop abort transfer 1: start 0: Continue transfer 1: Abort transfer
Transfer mode select 00: Transmit Mode 01: (reserved) 10: Transmit/Receive Mode 11: Receive Mode
Serial clock selection @ write 000 n = 4 1.25 MHz 001 n = 5 625 kHz CPU clcok: fc 010 n = 6 313 kHz fc = 20 MHz 011 n = 7 156 kHz (output to SCK pin) 100 n = 8 78.1 kHz fc fscl = [Hz] 101 n = 9 39.1 kHz n 2 110 n = 10 19.5 kHz 111
-
external clock : SCK2
Software reset state monitor @ read 0 1 During software reset Not during software reset
Transfer mode selection 00 8-bit transmit mode 01 (reserved) 10 8-bit transmit / receive mode 11 8-bit receive mode Continue / abort transfer 0 1 Continue transfer Abort transfer (automatically cleared after transfer aborted) Indicate transfer start / stop 0 1 Stop Start
Note1: Set the tranfer mode and the serial clock after setting to "0" and to "1". Note2: Write 0 to this bit in SIO mode.
Serial Bus interface 2 Data Buffer Register SBI2DBR (0181H)
Prohibit Readmodify-write
7
Bit symbol Read/Write After Reset RB7/TB7
6
RB6/TB6
5
RB5/TB5
4
RB4/TB4
3
RB3/TB3
2
RB2/TB2
1
RB1/TB1
0
RB0/TB0
R (receiver) / W (transfer) Undefined
Figure 3.10.33 Register for the SIO Mode
92CD54I-182
2006-01-27
TMP92CD54I
Serial Bus Interface 2 Control Register 2
7
SBI2CR2 (0183H)
Prohibit Readmodify-write
6
-
5
-
4
-
3
SBIM1 W 0
2
SBIM0 0
1
W 0
(Note2)
0
W 0
(Note2)
Bit symbol Read/Write After Reset Function
-
Serial bus interface operation mode selection 00: Port mode 01: SIO mode 2 10: I C bus mode 11: (reserved)
Serial bus interface operation mode selection 00 Port mode (serial bus interface output disabled) 01 Clocked-Synchronous 8-bit SIO mode 10 I C bus mode 11 (reserved)
2
Note1: Set the SBI2CR1 "000" before switching to a clocked-synchronous 8-bit SIO mode. Note2: Please always write "00" to SBI2CR2<1:0>.
Serial Bus Interface 2 Status Register
7
SBI2SR (0183H) bit Symbol Read/Write After reset Function -
6
-
5
-
4
-
3
SIOF R 0
Serial transfer operation status monitor
2
SEF 0
Shift operation status monitor
1
-
0
-
Shift operation status monitor 0 1 0 1 Shift operation terminated Shift operation in progress Transfer terminated Transfer in progress
Serial transfer operating status monitor
Figure 3.10.34 Registers for the SIO Mode
92CD54I-183
2006-01-27
TMP92CD54I
Serial Bus Interface 2 Baud Rate Register 0
7
SBI2BR0 (0184H)
Prohibit Readmodify-write
6
I2SBI1 R/W 0 IDLE2 0: STOP 1: RUN
5
-
4
-
3
-
2
-
1
-
0
-
Bit symbol Read/Write After Reset Function
W 0
(Note) Fixed to "0"
Operation during IDLE 2 mode 0 1 Stop Operate
Serial Bus Interface 2 Baud Rate Register 1
7
SBI2BR1 (0185H) Bit symbol Read/Write After Reset Function P4MON/ P4EN R/W 0 Internal clock 0: Stop 1: Operate
6
-
5
-
4
-
3
-
2
-
1
-
0
-
-
-
-
-
-
-
-
Baud rate clock control 0 1 Stop Operate
Figure 3.10.35 Registers for the SIO Mode
92CD54I-184
2006-01-27
TMP92CD54I
(1) Serial Clock i) Clock source SBI0CR1 is used to select the following functions: Internal Clock In an internal clock mode, any of seven frequencies can be selected. The serial clock is output to the outside on the SCK0 pin. The SCK0 pin becomes a high-level when data transfer starts. When the device is writing (in the transmit mode) or reading (in the receive mode) data cannot follow the serial clock rate, an automatic wait function is executed to stop the serial clock automatically and holds the next shift operation until reading or writing is complete.
Automatic wait function SCK0 pin output 1 2 3 7 8 1 2 6 7 8 1 2 3
SO0 pin output Write transmitted data
a0 a
a1
a2 a5
a6
a7
b0 b
b1 c
b4
b5
b6
b7
c0
c1
c2
Figure 3.10.36 Automatic-wait Function
External clock ( = "111") An external clock input via the SCK0 pin is used as the serial clock. In order to ensure the integrity of shift operations, both the high and low-level serial clock pulse widths shown below must be maintained. The maximum data transfer frequency is 1.25 MHz (when fc = 20 MHz).
SCK0 pin
tSCKL tSCKH tSCKL , tSCKH > 8/fc
Figure 3.10.37 Maximum Data Transfer Frequency when External Clock Input
92CD54I-185
2006-01-27
TMP92CD54I
ii) Shift edge Data is transmitted on the falling edge of the clock and received on the rising edge. Falling edge shift Data is shifted on the falling edge of the serial clock (on the falling edge of the SCK0 pin input/output). Rising edge shift Data is shifted on the rising edge of the serial clock (on the rising edge of the SCK0 pin input/output).
SCK0 pin output
SO0 pin output
bit 0
bit 1
bit 2
bit 3
bit 4
bit 5
bit 6
bit 7
Shift register
76543210 *7654321 **765432
***76543
****7654
*****765
******76
******7
(a) Falling edge shift
SCK0 pin
SI0 pin
bit 0
bit 1
bit 2
bit 3
bit 4
bit 5
bit 6
bit 7
Shift register
********
0*******
10******
210*****
3210****
43210***
543210** 6543210* 76543210
(b) Rising edge shift
Note: * = Don't care
Figure 3.10.38 Shift Edge
92CD54I-186
2006-01-27
TMP92CD54I
(2) Transfer Modes The SBI0CR1 is used to select a transmit, receive or transmit/receive mode. i) 8-bit transmit mode Set a control register to a transmit mode and write transmission data to the SBI0DBR. After the transmit data has been written, set the SBI0CR1 to "1" to start data transfer. The transmitted data is transferred from the SBI0DBR to the shift register and output, starting with the least significant bit (LSB), via the SO0 pin and synchronized with the serial clock. When the transmission data has been transferred to the shift register, the SBI0DBR becomes empty. The INTSBE0 (buffer empty) interrupt request is generated to request new data. When the internal clock is used, the serial clock will stop and the automatic wait function will be initiated if new data is not loaded to the data buffer register after the specified 8-bit data is transmitted. When new transmission data is written, the automatic wait function is canceled. When the external clock is used, data should be written to the SBI0DBR before new data is shifted. The transfer speed is determined by the maximum delay time between the time when an interrupt request is generated and the time when data is written to the SBI0DBR by the interrupt service program. When the transmit is started, after the SBI0SR goes "1" output from the SO0 pin holds final bit of the last data until falling edge of the SCK0. Data transmission ends when the is cleared to "0" by the INTSBE0 interrupt service program or when the is set to "1". When the is cleared to "0", the transmitted mode ends when all data is output. In order to confirm whether data is being transmitted properly by the program, the (bit 3 of the SBI0SR) to be sensed. The SBI0SR is cleared to "0" when transmission has been completed. When the is set to "1", transmitting datat stops. The turns "0". When the external clock is used, it is also necessary to clear the to "0" before new data is shifted; otherwise, dummy data is transmitted and operation ends.
92CD54I-187
2006-01-27
TMP92CD54I
Clear SCK0 pin (output) SO0 pin INTSBE0 interrupt request SBI0DBR a b (a) Internal clock Write transmitted data
Clear SCK0 pin (input) SO0 pin INTSBE0 interrupt request SBI0DBR a b (b) External clock Write transmitted data * a0 a1 a2 a3 a4 a5 a6 a7 b0 b1 b2 b3 b4 b5 b6 b7
*
a0
a1
a2
a3
a4
a5
a6
a7
b0
b1
b2
b3
b4
b5
b6
b7
Figure 3.10.39 Transfer Mode Example: Program to stop data transmission (when an external clock is used)
STEST1: BIT JR STEST2: BIT JR LD 2, (SBI0SR) ; If = 1 then loop NZ, STEST1 0, (PN) ; If SCK0 = 0 then loop Z, STEST2 (SBI0CR1), 00000111B ; 0
92CD54I-188
2006-01-27
TMP92CD54I
SCK0 pin SO0 pin bit 6 bit 7 tSODH = Min. 3.5/fC [s]
Figure 3.10.40 Transmitted Data Hold Time at End of Transmission
ii) 8-bit receive mode Set the control register to receive mode and set the SBI0CR1 to "1" for switching to receive mode. Data is received into the shift register via the SI0 pin and synchronized with the serial clock, starting from the least significant bit (LSB). When the 8-bit data is received, the data is transferred from the shift register to the SBI0DBR. The INTSBE0 (buffer full) interrupt request is generated to request that the received data be read. The data is then read from the SBI0DBR by the interrupt service program. When the internal clock is used, the serial clock will stop and the automatic wait function will be in effect until the received data is read from the SBI0DBR. When the external clock is used, since shift operation is synchronized with an external clock pulse, the received data should be read from the SBI0DBR before the next serial clock pulse is input. If the received data is not read, further data to be received is canceled. The maximum transfer speed when an external clock is used is determined by the delay time between the time when an interrupt request is generated and the time when the received data is read. Receiving of data ends when the is cleared to "0" by the INTSBE0 interrupt service program or when the is set to "1". If is cleared to "0", received data is transferred to the SBI0DBR in complete blocks. The received mode ends when the transfer is complete. In order to confirm whether data is being received properly by the program, the SBI0SR to be sensed. The is cleared to "0" when receiving is complete. When it is confirmed that receiving has been completed, the last data is read. When the is set to "1", data receiving stops. The is cleared to "0" (the received data becomes invalid, therefore no need to read it).
Note: The transfer mode needs to be changed, after reading the last received data with instruction to finish data receiving by clearing the to "0".
92CD54I-189
2006-01-27
TMP92CD54I
Clear SCK0 pin (output) SI0 pin INTSBE0 interrupt request SBI0DBR a Read receiver data b Read receiver data a0 a1 a2 a3 a4 a5 a6 a7 b0 b1 b2 b3 b4 b5 b6 b7
Figure 3.10.41 Receiver Mode (example: Internal clock)
iii) 8-bit transmit/receive mode Set a control register to a transmit/receive mode and write data to the SBI0DBR. After the data is written, set the SBI0CR to "1" to start transmitting/receiving. When data is transmitted, the data is output from the SO0 pin, starting from the least significant bit (LSB) and synchronized with the falling edge of the serial clock signal. When data is received, the data is input via the SI0 pin on the rising edge of the serial clock signal. 8-bit data is transferred from the shift register to the SBI0DBR and the INTSBE0 interrupt request is generated. The interrupt service program reads the received data from the data buffer register and writes the data which is to be transmitted. The SBI0DBR is used for both transmitting and receiving. Transmitted data should always be written after received data is read. When the internal clock is used, the automatic wait function will be in effect until the received data is read and the next data is written. When the external clock is used, since the shift operation is synchronized with the external clock, the received data is read and transmitted data is written before a new shift operation is executed. The maximum transfer speed when the external clock is used is determined by the delay time between the time when an interrupt request is generated and the time at which received data is read and transmitted data is written. When the transmit is started, after the SBI0SR goes "1" output from the SO0 pin holds final bit of the last data until falling edge of the SCK0. Transmitting/receiving data ends when the is cleared to "0" by the INTSBE0 interrupt service program or when the SBI0CR1 is set to "1". When the is cleared to "0", received data is transferred to the SBI0DBR in complete blocks. The transmit/receive mode ends when the transfer is complete. In order to confirm whether data is being transmitted/received properly by the program, set the SBI0SR to be sensed. The is set to "0" when transmitting/receiving is completed. When the is set to "1", data transmitting/receiving stops. The is then cleared to "0".
Note: When the transfer mode is changed, the contents of the SBI0DBR will be lost. If the mode must be changed, conclude data transmitting/receiving by clearing the to "0", read the last data, then change the transfer mode.
92CD54I-190
2006-01-27
TMP92CD54I
Clear SCK0 pin (output) SO0 pin SI0 pin INTSBE0 interrupt request SBI0DBR a Write transmitted data (a) Read received data (c) c b Write transmitted data (b) d Read received data (d)
*
a0 c0
a1 c1
a2 c2
a3 c3
a4 c4
a5 c5
a6 c6
a7 c7
b0 d0
b1 d1
b2 d2
b3 d3
b4 d4
b5 d5
b6 d6
b7 d7
Figure 3.10.42 Transmit/Received Mode (Example : Internal clock)
SCK0 pin SO0 pin bit 6 Bit 7 in last transmitted word tSODH = Min. 4/fC [s]
Figure 3.10.43 Transmitted Data Hold Time at End of Transmit/Receive
92CD54I-191
2006-01-27
TMP92CD54I
3.11 Serial Expansion Interface (SEI)
3.11.1 Overview
The SEI is one of the serial interfaces built in the TMP92CD54I, which can be connected to peripheral devices, by full duplex synchronous communication protocol. TMP92CD54I incorporates 1 channel of this SEI. Also the SEI can support the micro DMA mode corresponds to the micro DMA transfer.
(1) Features
The master outputs the shift clock only during data transfer. The clock polarity and phase are programmable The data is 8 bits long The MSB first or LSB first can be selected Micro DMA mode support for micro DMA transfers Transfer rate: 4Mbps, 2Mbps or 500kbps (when operating at fc = 20MHz) Error detection function
Write collision detection: when write to the shift register during the data transfer Overflow detection: when receive the new data with the transfer end flag is set (only slave) Mode fault detection: when the input to the SS pin goes L in Master mode (driver output immediately turns off)
MISO MOSI SECLK SS
SEE MODE MSTR CPHA CPOL BOS SER1:0 TMSE
SEI Control Register SEI Status Register
Port Control Unit
SEI Control Unit
SEI Data Register Shift Register
TASM SEF TSRC TSTC MODF WCOL SOVF
Clock Control Unit
Read Buffer
Clock Selector /2 /4 /16 Clock Divider Bit Order MUX
Internal SEI Clock
INTSEM INTSEE INTSER INTSET
D<7:0>
A<1:0>
SEICS
Figure 3.11.1
SEI Block Diagram
92CD54I-192
2006-01-27
TMP92CD54I
Table 3.11.1 Pin Function of SEI Channels SEI
SS (PM0) MOSI (PM1) MISO (PM2) SECLK (PM3)
3.11.2 SEI operation
During a SEI transfer, data is simultaneously transmitted (shifted out serially) and received serially (shifted in serially). In order to shift or sample the information on two serial data lines (MOSI/MISO), SEI clock (SECLK) takes the synchronization. Slave selection line ( SS ) individually selects the slave device. The slave device not selected cannot use the SEI bus. Because the master function is turned off in the master device when the multi master bus is connected, slave selection line ( SS ) can be used.
(1) SEI clock phase and polarity controls
Software can select any four combinations of serial clock phase and polarity using two bits in the SEI control register (SECR). The clock polarity is set by < CPOL > bit, and selects the clock of active "H" or active "L". The clock phase control bit selects one of two fundamentally different transfer formats. The clock phase and polarity should be identical for the master SEI device and the communicating slave device.
(2) SEI data and clock timing
The programmable clock timing and data of SEI can connect almost all devices around synchronous serial. Please see "3.11.4 SEI transfer format" for a detailed description of the transfer format.
92CD54I-193
2006-01-27
TMP92CD54I 3.11.3 SEI signal lines
There are four input/output pin signals associated with the SEI transfer. Every signal depends on the mode (master/slave) of the SEI device.
(1) SECLK
The SECLK pin functions as an output pin when the SEI is set for master and functions as an input pin when the SEI is set for slave. When the SEI is set for master, the SECLK signal is supplied by the internal SEI clock generation circuit. When the master starts transferring data, eight cycles clock are automatically output at the SECLK pin. When the SEI is set for slave, the SECLK pin functions as an input pin, in which case the SECLK signal from the master synchronizes data transfers between the master and slave. The slave device ignores the SECLK signal if the slave select SS pin is high. In both master and slave SEI devices, data is shifted in or out at each rising or falling edge of the SECLK signal and is sampled at the opposite edge. Edge polarity is determined by the SEI transfer protocol.
(2)
MISO/MOSI
The MISO and MOSI pins are used for transmitting and receiving serial data.
When the SEI is configured as a master, MISO is the data input line and MOSI is the data output line. When the SEI is configured as a slave, these pins reverse roles. In a multiple-master system, all SECLK pins are tied together, all MOSI pins are tied together and all MISO pins are tied together. Refer to Figure 3.11.5. A single SEI device is configured as a master, all other SEI devices on the SEI bus are configured as slaves. The single master drives the transfer clock and data out it's SECLK and MOSI pins to the SECLK and MOSI pins of the slaves. One selected slave device optionally drives data out it's MISO pin to the MISO master pin. The SECLK, MISO and MOSI pins can be set to function as open-drain pins.
(3)
SS
The SS pin behaves differently on master and slave devices.
On a slave device, this pin is used to enable the SEI slave for transfer and receive. If the SS pin of a slave is inactive (high), the device ignores SECLK clocks and keeps the MISO output pin in the high-impedance state. On a master device, the SS pin serves as an error-detection input for the SEI. If the SS pins go low while the SEI is a master, it indicates that some other device on the SEI bus is attempting to be master. This attempt causes the master device sensing the error to immediately exit the SEI bus to avoid potentially damaging driver contentions. This error is called mode fault.
Set whether to permit the mode fault detection by < MODE > bit of the SECR register or to prohibit it. When the bit = 0, the
SS pin is enabled for mode fault detection input. When the bit = 1,
the SS pin is disabled from mode fault detection input.
92CD54I-194
2006-01-27
TMP92CD54I 3.11.4 SEI transfer format
The transfer format is decided the setting of the bit and bit in the SECR register. bit switches between two different transfer protocols.
(1) Transfer Format of =0
Figure 3.11.2 shows the transfer format for a =0 transfer. SECLK cycle 1 2 3 4
5
6
7
8
SECLK(=0) SECLK(=1)
Internal shift clock
MOSI MISO
SS
(compatibility mode) (micro DMA mode) (micro DMA mode & master) (micro DMA mode & Slave)
Figure 3.11.2
Transfer Format of =0
=0 No communication (idle) SECLK level L H Data shift Shift clock falling edge Shift clock rising edge Data sampling Shift clock rising edge Shift clock falling edge
=0 =1
In master mode, writing new data to the SEDR register starts the transfer. The new data are switched on the MOSI pin half a clock before the shift clock starts the operation. SECR selects whether the data are shifted out from the MSB or from the LSB. After the final shift cycle, the flag is set to 1 if Compatibility mode is selected, and the and flags are set to 1 if Micro DMA mode is selected. In slave mode, writing to the SEDR register is prohibited while the SS pin is L. Attempting a write during this period triggers a write collision and sets the SESR register's flag to 1. This terminates the transfer. At this time the software must wait until the SS pin goes H again before writing the next data to the SEDR register, even if the or flag is set to 1. When using micro DMA for transferring data to the SEDR register in slave mode, the setting of the flag is delayed until the SS pin goes H.
92CD54I-195
2006-01-27
TMP92CD54I
(2) Transfer format of =1 Figure 3.11.3 shows the transfer format for a =1 transfer. SECLK cycle SECLK(=0) SECLK(=1) MOSI MISO SS (compatibility mode) (micro DMA mode) (micro DMA mode) 1 2 3 4 5 6 7 8
Figure 3.11.3 =1
Transfer Format of =1
=0 =1
No communication (idle) SECLK level L H
Data shift Shift clock rising edge Shift clock falling edge
Data sampling Shift clock falling edge Shift clock rising edge
In master mode, writing new data to the SEDR register starts the transfer. The new data are switched on the MOSI pin at the initial edge of the shift clock. SECR selects whether the data are shifted out from the MSB or from the LSB. In contrast to slave mode with =0, in slave mode when =1, the SEDR register can be written even while the SS pin is L. In both master and slave modes, after the final shift cycle the flag is set to 1 if compatibility mode is selected, and the and flags are set to 1 if micro DMA mode is selected. Attempting a write to the SEDR register during a data transfer triggers a write collision. Write the data to the data to SEDR after the is set to 1, or the and flags are set.
92CD54I-196
2006-01-27
TMP92CD54I 3.11.5 Functional description
Figure 3.11.4 shows master-to-slave connection via the SEI. The different nodes on a SEI bus function like a distributed shift register. When data is sent from the MOSI pin of the master device to the corresponding pin of the slave device, data from the slave is sent back from the MISO pin of the slave device to the corresponding pin of the master device. This means that data is communicated in full-duplex mode and data output and data input are synchronized by the same clock signal. After a transfer, the transmission data of eight bit shift register is replaced with receive data.
Master 8-bit shift register MOSI MISO SEI clock generator SECLK
SS
Slave MOSI MISO SECLK 0V
SS
8-bit shift register
5V
Figure 3.11.4
Connection between Master and Slave in SEI
Figure 3.11.5 shows a configuration of the SEI system. The port used as the output of SEI, can be set for open-drain output programmable. Therefore, this port can be connected to multiple devices.
Master
PORTn PORTn'
SS SECLK MOSI MISO VCC
Slave 0
SS SECLK MOSI MISO
Slave 1
SS SECLK MOSI MISO
PORTn, n': any output ports
Figure 3.11.5
Configuration of SEI System (Comprised of One Master and Two Slaves)
92CD54I-197
2006-01-27
TMP92CD54I 3.11.6 Operation Modes
SEI allows the programmer the choice between 2 different operation modes, the compatibility mode and the micro DMA mode. Those operation modes differ in terms of flag clearing, interrupt generation and use propriety of micro DMA. The table below shows the differences between the two operation modes.
Table 3.11.2 error flag clearing Differences between the Two Operation Modes micro DMA mode Writing a "1" to the status register
transfer status flag clearing
interrupt generation
compatibility mode Reading a register with the Status flag set, followed by SECR register or SEDR register access Reading a register with the Status flag set, followed by an access to the data register INTSEM: INTSEE:
Writing a "1" to the status register or by reading or writing the data register INTSEM: INTSEE: or INTSER: INTSET: yes
micro DMA usage
No
SEI can be switched between these operation modes, if SEI is disabled ( = 0) by setting the bit in the SESR register.
92CD54I-198
2006-01-27
TMP92CD54I 3.11.7 SEI registers
Use SEI control register SECR, SEI status register SESR, and SEI data register SEDR to set SEI.
(1) SEI control register (SECR) SEI Control Register
bit Symbol Read/Write After reset Read-modify Function -write instructions prohibited.
SECR (0060H)
7 6 5 MODE SEE BOS W 0 0 0 Mode fault SEI Bit order detection operation selection 0:enabled 0:stopped 0:MSB first 1:disabled 1:operating 1:LSB first
3 2 1 0 CPOL CPHA SER1 SER0 R/W 0 0 1 1 1 Clock SEI transfer rate Mode Clock Phase selection selection polarity 0:slave selection selection 00: Reserved 01: divide-by- 2 1:master see figure see figure 10: divide-by- 4 3.11.2, 3.11.2, 3.11.3 3.11.3 11: divide-by-16
4 MSTR
:
Mode fault detection enable 0: Mode fault detection enabled. 1: Mode fault detection disabled. Only the master mode is effective and invalid at the slave mode.
:
SEI function enable 0: SEI function is off. It is necessary to disable the SEI function to switch between the micro DMA mode and the compatibility mode. Wait until the transfer in progress is completed before you clear the bit to stop the SEI operation. Clear to 0 before executing HALT instruction in IDLE1, IDLE3 or STOP mode. 1: SEI function is on. Before using the SEI, make sure that the port function needs to be set as SEI function.
:
Bit order select The bit order selection bit selects whether the data to be transferred is MSB first or LSB first. 0: The MSB bit of the SEDR register (bit 7) will be transmitted first. 1: The LSB bit of the SEDR register (bit 0) will be transmitted first.
:
Master/Slave mode select 0: SEI is configured as slave. 1: SEI is configured as master.
:
Clock polarity select 0: Select the clock of active "H". The SECLK clock is "L" level at non-communication state. 1: Select the clock of active "L". The SECLK clock is "H" level at non-communication state. Refer to Figure 3.11.2 and Figure 3.11.3.
:
Clock phase select bit selects one of two, different transfer format. Refer to Figure 3.11.2.and Figure 3.11.3.
:
SEI bit rate select The following table shows the relationship between the and control bits and the bit rate for transfers when the TSEI is operating as a master. When the TSEI is operating as a slave, the serial clock is input from the master, therefore, the and control bits have no meaning.
92CD54I-199
2006-01-27
TMP92CD54I
Table 3.11.3 SEI transfer bit rate
0 0 1 1 0 1 0 1 Divide-by-rate Transfer rate of internal SEI clock (@ fc = 20 MHz) Don't use this setting. 2 4 Mbps 4 2 Mbps 16 500 Kbps
Note: internal SEI clock = 2/5xfc
(2) SEI status register (SESR) SEI Status Register SESR (0061H) compatibility mode
bit Symbol Read/Write After reset 0 Function SEI
7 SEF
6 WCOL R
5 SOVF
4 MODF
3 -
2 -
1 -
0 Write transfer collision complete flag flag 1:write 1:transfer collided completed
0 0 Overflow Mode flag fault flag (slave) (master) 1:overflow 1:fault occurred occurred
0 TMSE R/W 0 SEI mode select 0:compatibility mode 1:micro DMA mode
SEI Status Register
bit Symbol Read/Write After reset micro DMA Function
SESR (0061H)
7 -
6 WCOL 0 Write collision flag 1:write collided
mode
Readmodify-write instructions prohibited.
4 3 2 1 0 MODF TSRC TSTC TASM TMSE R R/W 0 0 0 0 0 0 Overflow Mode SEI SEI SEI SEI mode flag fault flag receive transmit automated select (slave) (master) complete complete shift mode 0:compati1:overflow 1:fault flag flag (master) bility mode occurred occurred 1:receive 1:transmit interrupt 1:micro completed completed mask DMA mode (slave)
5 SOVF
: Transfer complete flag Compatibility mode: The flag is automatically set to one at the end of a SEI transfer. The flag is automatically cleared to 0 by reading the SESR register with flag set to 1, followed by an access of the SEDR register. Micro DMA mode: Always reads as undefined, writes to this flag have no effect. : Write collision error flag Compatibility mode: The flag is automatically set to 1, if the SEDR register is written while a transfer is in progress. The write itself has no effect on the running transmission. The flag is automatically cleared to 0 by reading the SESR register with bit set followed by an access to the SEDR register. No interrupt will be generated on the assertion of this flag. Micro DMA mode: The flag is automatically set to 1, if the SEDR register is written while a transfer is in progress. The write itself has no effect on the running transmission. The flag can only be reset by writing a "1" to it. Writing a "0" has no effect. An interrupt will be generated on INTSEE on a transition from "0" to "1", if the module is configured as a slave and the bit is equal to "0".
92CD54I-200
2006-01-27
TMP92CD54I
: Slave mode overflow error flag Master mode: Always reads as undefined, writes to this flag have no effect. Slave mode: Compatibility mode: The flag is automatically set to 1, if a new byte has been completely received and the flag is still set to 1. The flag is automatically cleared to 0 by reading the SESR register with the flag is set to 1 followed by an access to the SEDR register. The flag will also be cleared to 0 by switch to the master mode. In compatibility mode, no interrupt will be generated on the setting of flag. Micro DMA mode: The flag is automatically set to 1, if a new byte has been completely received and the flag is still set to 1. The flag can only be cleared to 0 by writing a "1" to it. Writing a "0" to it has no effect. INTSEE is generated with =1, if flag from 0 to 1.
: Mode-fault error flag Master mode: Compatibility mode: The flag is set to 1, if the SS signal goes to active low while the SEI is configured as a master. In this case: 1. 2. 3. 4. The SEI output pin drivers are disabled and the output pins are placed in high-impedance state. The bit in the SECR register is cleared to 0. The bit is forcibly cleared to 0 to disable the SEI system. An interrupt INTSEM is generated.
The flag is automatically cleared to 0 by reading the SESR register with the bit set to 1, followed by a write to SECR register. Micro DMA mode: It is the same as that of the compatibility mode, except the flag's clearance. This flag can only be cleared to 0 by writing a "1" to it. Writing a "0" to this flag has no effect. Slave mode: Always reads as undefined, writes to this flag have no effect. : Receive completion flag Compatibility mode: Always reads as undefined, writes to this flag have no effect. Micro DMA mode: The flag is set to 1 when a receiving has been completed, that is when eight cycles where shifted on the SECLK signal. It is cleared to 0 by performing a read operation on the SEI data register, by switching to compatibility mode or by writing a "1" to this flag. Writing a "0" to this flag has no effect. An interrupt INTSER will be generated on the assertion of this flag.
92CD54I-201
2006-01-27
TMP92CD54I
: Transmit completion flag Compatibility mode: Always reads as undefined, writes to this flag have no effect. Micro DMA mode: Timing where the flag is set by transfer format and master/slave is different though < TSTC > flag is set when the transmission of the data of one byte is completed. Refer to Figure 3.11.2 and Figure 3.11.3. It is cleared to 0 by performing a write operation on the SEI data register, by switching to compatibility mode or by writing a "1" to this flag. Writing a "0" to this flag has no effect. An interrupt INTSET will be generated on the assertion on this flag.
: Automated shift modemasterINTSEE interrupt maskslave Compatibility mode: Always reads as undefined, writes to this flag have no effect. Micro DMA mode: The function of this bit is depending on bit setting. Master mode: 0: Disables the automated shift mode. 1: Enables the automated shift mode. In this mode a read access to the SEI data register SEDR will perform the following functions.
The SEI data register will be cleared to 00 hex. A new transfer will be initiated, thus in master mode 8 low bits will be sent, 8 new bits will be received.
The automated shift mode also works when it is combined with a micro DMA. It has no effect, when SEI is in the slave mode. Slave mode: This bit functions as a mask for the interrupt INTSEE generation of the and flags. 0: An interrupt INTSEE will be generated when the flag is set to "1", but not effect on the flag. 1: An interrupt INTSEE will be generated when the flag is set to "1", but not effect on the flag.
: SEI mode select 0: Compatibility mode. 1: Micro DMA mode. Selects the micro DMA mode, which also allows micro DMA transfers. It is necessary to disable the SEI system before switching to the micro DMA mode.
92CD54I-202
2006-01-27
TMP92CD54I
(3) SEI data register (SEDR)
SEI Data Register SEDR
(Transmission)
(0062H)
bit Symbol Read/Write After reset
7 SED7 0
6 SED6 0
5 SED5 0
4 SED4 W 0
3 SED3 0
2 SED2 0
1 SED1 0
0 SED0 0
SEDR
(Receiving)
(0062H)
bit Symbol Read/Write After reset
7 SED7 0
6 SED6 0
5 SED5 0
4 SED4 R 0
3 SED3 0
2 SED2 0
1 SED1 0
0 SED0 0
Note: SEDR is not able to read, modify, write.
This register is used to transmit and receive data. When the SEI system configured as a master, transfers are started by a software write to the SEDR register. After once starting transmission, please write after checking that the transmission end flag has surely set by interrupt or polling when master device writes to SEDR register. Only when the bit of the SECR register is "1", a read/write to the SEDR register is possible. When the bit is "0", the write access is ignored and "00H" will be read whenever it read.
92CD54I-203
2006-01-27
TMP92CD54I 3.11.8 SEI system errors
Three system errors can be detected by the SEI device. The first type error arises in a multiple-master system when more than one SEI device simultaneously tries to be master. This error is called a mode fault. The second type error, a write collision, indicates that an attempt has been made to write data to the SEDR while a transfer was in progress. The third error occurs when the SEI system is configured as a slave and a new byte of data has been completely shifted in by the remote bus master before the old byte could be read.
(1) Mode-fault error
In the SEI system, if more than one device is simultaneously set as the master, competition arises among the drivers. When an SEI device is set as the master, a mode fault error occurs when the SS pin input goes L and the driver output goes off. This phenomenon can be used to avoid competition among masters. When a mode fault error occurs, the following action is immediately taken.
The SECR register's bit is forcibly cleared to 0 to set the SEI for slave. The SECR register's bit is forcibly cleared to 0 to disable the SEI system. The SESR register's flag is set to 1, and INTSEM interrupt pulse is generated. The SEI output pin drivers are disabled and the output pins are placed in the high-impedance state.
When the problem which has caused the mode fault is resolved in software, the flag is cleared to 0 and the SEI system can be set up to return to normal operation. The writing is not able to the SECR register while the flag is set. In compatibility mode the flag is automatically cleared by reading the SESR register while the flag is set to 1, and then writing to the SECR register. In micro DMA mode the flag is cleared to 0 by writing a 1 to it. Only when two or more devices are selected at the same time as the master, this product detects a mode fault error. The collision of the MISO output when two or more slave devices are selected on the SEI system cannot be detected. The drivers can be protected from latch-up by means of an open-drain. This involves changing the SEI output driver to be of open-drain type. The SECLK pin, MOSI pin and MISO pin can be individually set as open-drain programmably. In the case, an additional external pull-up register is necessary.
(2) Write collision error
A write collision occurs is the SEDR register is written to while a transfer is in progress. Because the SEDR register is not a double buffer in the direction of the transmission, writing before transfer in the SEDR register is writing directly in the SEI shift register. Because this write corrupts any transfer in progress, a write collision error is generated. The transfer continues undisturbed and the write data which caused the error is not written to the shift register. A write collision is normally a slave error because a slave has no control over when a master will initiate a transfer. A master knows when a transfer is in progress, thus, there is no excuse for a master generating a write collision error. Despite this, the SEI device can detect write collision in a master as well as in a slave. In slave mode a write collision is likely to occur, since the master shifts data faster, than it can be handled by the slave. A write collision will occur, when the slave is transferring a new value to the data register after the master started the next shift cycle. In micro DMA mode an interrupt on INTSEE will occur if the module is configured as a slave, the bit is clear to 0 and the flag is set to 1.
92CD54I-204
2006-01-27
TMP92CD54I
(3) Slave mode overflow error
On an SEI bus the transmission bit rate is determined by the master. It becomes easy to cause the problem that the slave cannot follow to the master's transmission by a high-speed bit rate, i.e. that the data is shifted in faster than it can be processed by slave. The SEI device detects data overflowing with < SOVF > flag of the SESR register. The flag will be set to 1 when:
The SEI is configured as a slave. An old byte of data is still waiting to be read when a new byte of data has been completely received.
When is set to 1, it signifies that SEDR has been overwritten by new byte data. Since this error only occurs in slave mode, the bit can be used as an interrupt mask for this flag. If the flag in the status register is set to 1, an interrupt is only generated on INTSE0 if the current mode is micro DMA mode and the bit is 1.
92CD54I-205
2006-01-27
TMP92CD54I 3.11.9 Interrupt generation
Interrupt processing differs for the two SEI operating modes, which can be selected using the bit in the SESR register. It generates four interrupts par one SEI that are INTSEM, INTSEE, INTSER and INTSET.
(1) Compatibility mode
In compatibility mode the INTSEM* and INTSEE are used. *The SEI generates the INTSEM interrupt, if the flag in the SESR register shows a transition from "0" to "1". And it generates the INTSEE interrupt, if the flag shows a transition from "0" to "1".
INTSEM INTSEE INTSER INTSET (2) Micro DMA mode Interrupt on Interrupt on Inactive Inactive
In micro DMA mode all four interrupts are used to allow the micro DMA transfers to and from the SEI data register. The INTSEM is generated on a transition of the flag from "0" to "1". The INTSEE is generated if the module is in slave mode on a transition of the flag from "0" to "1" with bit is "0" or on a transition of the flag from "0" to "1" with bit is "1". After a completed transfer both the flag and the flag in the SESR register are set to 1 simultaneously. However, there is an exception for equals "0" in slave mode. Please see "3.11.4(1) transfer format of =0". Both flags trigger the INTSER and INTSET interrupts. The flag generates an interrupt INTSER on a transition from "0" to "1". The flag can be cleared by either reading the SEDR register or by writing a "1" value to this flag. The flag generates an interrupt INTSET on a transition from "0" to "1". The flag is cleared to 0 by either writing the SEDR register or by writing a "1" value to this flag. In order to use the micro DMA, the INTSER interrupt and the INTSET interrupt are used as a trigger of micro DMA transmission. The INTSER interruption: The INTSET interruption: The data read from the SEDR register is used as a trigger of micro DMA transfer. A new data write to the SEDR register is used as a trigger of micro DMA transfer.
Thus initiating a new transfer.
INTSEM INTSEE INTSER INTSET
Interrupt on Interrupt on or Interrupt on Interrupt on
Note 1) In slave mode, it is at the time of =0 Note 2) In slave mode, it is at the time of =1
The Interrupts can be disabled individually at the interrupt controller.
92CD54I-206
2006-01-27
TMP92CD54I 3.11.10 Usage of the micro DMA of SEI ( micro DMA mode )
The usage of the micro DMA for larger SEI transfers allows speed up the communication on the SEI by reducing the CPU effort for interrupt processing, reducing the time gap between two successive transfers.
The micro DMA transfers can be used in both the master and the slave mode.
(1) Read/write micro DMA transfer
In this mode two micro DMA channels are used. One micro DMA channel is used to send the receive data from the SEDR register to the memory. The other micro DMA channel is used to send the new data from the memory to the SEDR register. The data transfer will be completely handled by the micro DMA controller. Initiation In this mode, set < TMSE > bit of the SESR register to 1 and set it to micro DMA mode. Two micro DMA channels have to be set up for the transfer. One micro DMA is triggered on the INTSER to transfer the value that was received from the SEDR register to the memory. The other micro DMA is triggered on the INTSET to write new data from the memory to the SEDR register. Restart transfer by this setting in the master mode. The micro DMA with the lower channel has to be assigned to the INTSER interrupt since it takes precedence over the micro DMA with the higher channel number. The micro DMA transfer is initiated the first time by writing the first transfer value to the SEDR register. The following transfers will be handled automatically by the micro DMA controller.
Table 3.11.4 SEI setting when micro DMA transfer (read/write) 1 0:Slave 1:Master INTSEE interrupt mask 0 1
Micro DMA transfer Once initiated the micro DMA wait to be triggered by a completed transfer. On a completed transfer both and flags are set to 1 and both SEI receive completed interrupt pulse INTSER and SEI transmit completed interrupt pulse INTSET are generated. Since the micro DMA channel with the lower channel number takes precedence, the read micro DMA transfer is performed before the write micro DMA transfer. The read micro DMA reads the value from the SEDR register and stores the value at the location specified within the micro DMA control registers. The read access also clears the flag to 0 in effect. After this the write micro DMA transfers a value from a specified memory address to the SEDR register. The write access to the SEDR register automatically clears the flag in the SESR register to 0 and starts a new transfer when the module is in master mode. After each micro DMA transfer the count registers for both micro DMA are decreased. This procedure continues until the counters reach the value of "0". A micro DMA interrupt will be generated to indicate the end of the micro DMA transfer. An interrupt service routine triggered on the end of the micro DMA transfer can be used to re-initiate the micro DMA transfers.
92CD54I-207
2006-01-27
TMP92CD54I
Initiation Wait on transfer completed Register initial setting Initiation SEI for micro DMA mode Refer to Table 3.11.4 Setup lower micro DMA register for automated read, triggered on INTSER Setup higher micro DMA register for automated read, triggered on INTSER ,=1 generates INTSER,INTSET Read micro DMA transfer (Since the read micro DMA owns the lower channel number the read micro DMA is processed first.) Micro DMA is written at the address which reads SEDR register and was set up by transmission destination address register. According to a setup of transmission mode register, transmission destination address register serves as address increment, decrement, or fixation. Decrease micro DMA counter The read-access to the SEDR register automatically clears the flag to 0.
transfer beginning Write data in the SEDR register before transfer when SEI is slave mode. If SEI is setup as a master, start the first write transfer by writing the first value to the SEDR register.
Write micro DMA transfer Micro DMA reads the address set to by transmitting agency address register, and writes it to SEDR register. According to a setup of transmission mode register, transmission destination address register serves as address increment, decrement, or fixation. Decrease micro DMA counter The write-access to the SEDR register automatically clears the flag to 0.
micro DMA counter = 0? YES Generate micro DMA transfer end interrupts for both channels
NO
END Figure 3.11.6 Flowchart for Micro DMA Read/Write Transfer
92CD54I-208
2006-01-27
TMP92CD54I
(2) Read only micro DMA transfer
This mode is used to shift in lager blocks of data, while "don't care data" is shifted out (e.g.: reads from serial EEPROM). Only a single micro DMA is used to store the data read from the SEDR register to a specified RAM area. Initiation For this mode the SEI has to be configured for micro DMA mode by setting the SESR to 1. When SEI is acting as master, the bit has to be set additionally to allow the automated shifting. Just one micro DMA has to be set up to transfer the SEDR data to a memory location specified within the micro DMA destination address register. The SEI receive completion interrupt INTSER is used to trigger this micro DMA. The SEI transfer completion interrupt INTSET is disabled at the interrupt controller. If SEI is set up as a master, the first transfer has to be initiated by writing the SEDR register.
Table 3.11.5 SEI setting when micro DMA transfer (read) 0: Slave INTSEE interrupt mask 1: Master 1
1
1
Micro DMA transfer After initiating the first transfer, the micro DMA waits for the transfer to be completed. With the completion of the transfer both the SESR and SESR are set to 1. On setting the to 1, the INTSER interrupt is generated to trigger the micro DMA. The flag will be set to 1 simultaneously and will remain set to 1 till the end of the block transfer. The micro DMA moves the received value from the SEDR register to the memory location specified in its destination address register. After the micro DMA transfer, the count register of the micro DMA is decreased. When the SEDR register is read, the SEDR register (shift register) is cleared to "00H" automatically because bit is 1. Simultaneously a new transfer is started automatically. This procedure will repeat until the micro DMA counter reaches a value of "0". A micro DMA interrupt will be generated to indicate the end of the micro DMA transfer. Moreover, about the flag, it remains set to 1 after the first transmission end, unless it is reset.
92CD54I-209
2006-01-27
TMP92CD54I
Initiation Wait on transfer completed Register initial setting =1 generates INTSER
Set SEI to micro DMA mode. Set it to the automatic shift mode (=1) when SEI is a master. Refer to Table 3.11.5
Setup micro DMA channel for automated read, triggered on INTSER.
Read micro DMA transfer Micro DMA is written at the address which reads SEDR register and was set up by read transmission destination address register. According to a setup of transmission mode register, transmission destination address register serves as address increment, decrement, or fixation. Decrease micro DMA counter The read-access to the SEDR register automatically clears flag to 0. When =1 1, Clears SEDR register (00H) 2, Start a new transfer automatically 3, new 8 bits are shifted in
transfer beginning If SEI is setup as a master, start the first write transfer by writing the first value to the SEDR register.
micro DMA counter = 0?
NO
YES Generate micro DMA transfer end interrupts
END
Figure 3.11.7
Flowchart for Micro DMA Read only Transfer
92CD54I-210
2006-01-27
TMP92CD54I
(3) Write only micro DMA transfer
The write only transfer mode is used to transmit larger blocks of data while the incoming data is ignored. Only a single micro DMA is used to transfer new transmit data from a memory location specified by the micro DMA source address register to the SEDR register. Initiation For this mode the module has to be configured for micro DMA mode by setting the SESR to 1. One of the micro DMA channels has to be set up for the automated write to the SEDR register. This micro DMA is triggered by the SEI transmit completion interrupt INTSET. The SEI receive completion interrupt INTSER is disabled at the interrupt controller. If SEI is set up as a master, the first transfer is initiated by writing the first value to the SEDR register.
Table 3.11.6 SEI setting when micro DMA transfer (write) 0: Slave INTSEE interrupt mask 1: Master 0
1
1
Micro DMA transfer After starting the first transfer the micro DMA waits for the transfer to be completed. On completion both the and flags in the SEI status register are set to 1. Disregard flag and flag because reception is not used. After the first transmission end, the flag is set and it remains set to 1 unless it is reset. Once the flag is set to 1, the flag remains being 1, unless it is reset. The flag generates the INTSET interrupt, which will trigger the micro DMA transfer. The micro DMA reads a value from the memory address specified in its source register and transfers it to the SEDR register. After the micro DMA transfer, the count register of the micro DMA is decreased. The write access to the SEDR register clears the flag to 0 and starts a new transfer on the SEI bus when the module is in master mode. This procedure continues until the Micro DMA counter reaches a value of "0". A micro DMA interrupt will be generated to indicate the end of the micro DMA transfer.
92CD54I-211
2006-01-27
TMP92CD54I
Initiation Wait on transfer completed Register initial setting =1 generates INTSET
Set SEI to micro DMA mode. Refer to Table 3.11.6
Setup micro DMA channel for automated read, triggered on INTSET.
Write micro DMA transfer Micro DMA is written at the address set up by transmitting agency address register, and writes it to SEDR register. According to a setup of transmission mode register, transmission destination address register serves as address increment, decrement, or fixation. Decrease micro DMA counter The write-access to the SEDR register automatically clears flag to 0.
transfer beginning If SEI is setup as a master, start the first write transfer by writing the first value to the SEDR register.
NO micro DMA counter = 0?
YES Generate micro DMA transfer end interrupts
END
Figure 3.11.8
Flowchart for Micro DMA Write only Transfer
92CD54I-212
2006-01-27
TMP92CD54I
3.12 CAN Controller
(1) Overview Supports CAN version 2.0B Supports standard format and extended format Supports data frames and remote frames in both format 16 Mailboxes (15 Receive & Transmit + 1 Receive only) Baud rate up to 1Mbps on the CAN bus (at fc = 20MHz) Programmable baud rate with bit time parameter Built in baud rate prescaler 2 selectable mechanism for internal arbitration of transmit messages mailbox number identifier priority Time stamp for receive and transmit messages Operation modes Normal operation mode Configuration mode Sleep mode (Wake up on CAN bus activity or CPU access) Halt mode Test loop back mode (Enable the stand alone operation by self acknowledge) Test error mode (Write enable to error counter) Acceptance filter Programmable global mask for mailboxes 0 to 14 Programmable local mask for mailbox 15 Acceptance mask bit for identifier extended bit Flexible interrupt structure (3 interrupts) INTCR: Receive interrupt INTCT: Transmit interrupt INTCG: Global interrupt (include warning level, error passive, bus off, and so on) (2) Nomenclature R/W R W R/S R/C Read and write access by the CPU Read access by the CPU Write access by the CPU Read access and set (write with 1) by the CPU Read access and clear (write with 1) by the CPU " in the mailbox denotes blank bits. The values of these bits are
The bit Symbol "
indeterminate when read. The column of after Reset " - " in the mailbox indicates that the initial value is indeterminate. The bit Symbol " " in the control register denotes reserved bits. They indicate that the value is indeterminate when read. Always write "0" when write.
92CD54I-213
2006-01-27
TMP92CD54I
(3) Architecture
INTCR INTCT INTCG
Control Register & Interrupt Logic
Transmit buffer Data field Identifier
Transmit multiplexor
RD WR D A
Control ADR Data
RD
CPU Interface
WR D A
Internal Control Bus
Transmit data
CAN Protocol Controller
Data Address
TX RX
Internal Priority Compare register Write decoder Temporary receive buffer Data field Identifier SaveData Receive Data
Mailbox 16x128 bits
Mailbox Data Out Mailbox Data In
Match ID
Time stamp
RD WR A
GAM mask LAM mask
Acceptance filter
counter
Write Identifier (Compare)
CAN State Machine
Compare register
Figure 3.12.1 Block Diagram of CAN Controller
(4) CAN bus interface The interface to the Can bus is a simple two-wire line, consisting of an input pin RX and an output pin TX. This CAN bus interface is suitable for the operation with CAN bus transceivers based on ISO/DIS 11898.
92CD54I-214
2006-01-27
TMP92CD54I 3.12.1 Memory map
The mailboxes and control registers used by the CAN are mapped to the memory locations shown below. Table 3.12.1 Register MB0MI0 MB0MI1 MB15TSV MC MD TRS TRR TA AA RMP RML LAM0 (high) LAM1 (low) GAM0 (high) GAM1 (low) MCR GSR BCR1 BCR2 GIF GIM MBTIF MBRIF MBIM CDR RFP CEC TSP TSC CAN Mailboxes and Control Registers Description Mailbox Mailbox Configuration Register Mailbox Direction Register Transmit Request Set Register Transmit Request Reset Register Transmission Acknowledge Register Abort Acknowledge Register Receive Message Pending Register Receive Message Lost Register Local Acceptance Mask Register 0 (bit 28 to 16) Local Acceptance Mask Register 1 (bit 15 to 0) Global Acceptance Mask Register 0 (bit 28 to 16) Global Acceptance Mask Register 1 (bit 15 to 0) Master Control Register Global Status Register Bit Configuration Register 1 Bit Configuration Register 2 Global Interrupt Flag Register Global Interrupt Mask Register Mailbox Transmit Interrupt Flag Register Mailbox Receive Interrupt Flag Register Mailbox Interrupt Mask Register Change Data Request Register Remote Frame Pending Register CAN Error Counter Register Time Stamp Counter Prescaler Register Time Stamp Counter Register
Address 000200H * 000202H * 0002FEH * 000300H 000302H 000304H * 000306H * 000308H * 00030AH * 00030CH * 00030EH * 000310H 000312H 000314H 000316H 000318H 00031AH 00031CH 00031EH 000320H * 000322H 000324H * 000326H * 000328H 00032AH 00032CH * 00032EH * 000330H 000332H *
Note: * Read-modify-write prohibited.
92CD54I-215
2006-01-27
TMP92CD54I 3.12.2 Mailboxes
The mailbox is configured with Register to store identifiers and transmit/receive data, which can be accessed by the CAN controller and the CPU. The CPU controls the CAN controller by modifying the contents of the mailboxes and control registers. The contents of the mailboxes and control registers are used to perform the functions of the acceptance filtering, transmit message and interrupt handling. In order to initiate a transfer, the transmission request bit has to be written to the corresponding register. The entire transmission procedure is done then without any CPU involvement. If a mailbox has been configured as receive messages the CPU easily reads its data registers using CPU read instructions. The mailbox may be configured to interrupt the CPU after every successful message transmission or reception. The mailbox module provides 16 mailboxes, each of which has 8 bytes long data, 29-bit identifier and several control bits. Each mailbox, except the last one, can be set for either transmit or receive operation. Mailbox 15 is a receive-only mailbox with a special acceptance mask designed to allow groups of different message identifiers to be received. Each mailbox is 16 bytes in size. Address 0200H to 020FH 0210H to 021FH : : 02E0H to 02EFH 02F0H to 02FFH Mailboxes MB0 (Used for transmit/receive) MB1 (Used for transmit/receive) : : MB14 (Used for transmit/receive) MB15 (Used for receive-only)
Each mailbox is configures as shown below. (Mailbox "n") MBn + 00H 02H 04H 06H 08H 0AH 0CH 0EH b15 MI0 MI1 MCF D1 D3 D5 D7 TSV D0 D2 D4 D6 b0 (Message identifier field 0) (Message identifier field 1) (Message control field) (Data field 0,1) (Data field 2,3) (Data field 4,5) (Data field 6,7) (Time stamp value)
Note: MBn = 0200H + nx10H, n = 0, 1, 2, ..., 15
The components of each mailbox are explained in the next pages.
92CD54I-216
2006-01-27
TMP92CD54I
Message Identifier Field 0 (MI0)
Message Identifier Field 0 Low MBnMI0L (MBn+00H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
7 ID23 -
6 ID22 -
5 ID21 -
4 ID20 R/W -
3 ID19 -
2 ID18 -
1 ID17 -
0 ID16 -
Identifiers to are stored. Message Identifier Field 0 High MBnMI0H (MBn+01H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
15 IDE -
14 GAME -
13 RFH -
12 ID28 R/W -
11 ID27 -
10 ID26 -
9 ID25 -
8 ID24 -
Identifiers to are stored. Remote frame processing bit 0 For transmit mailbox, remote frame are not responded to. 1 For transmit mailbox, remote frame are responded to. (The bit is set.) 0/1 For receive mailbox, they are processed as data frames. (The and bits are set.) Global (local) acceptance mask enable 0 Acceptance mask is not used for acceptance filtering. 1 Acceptance mask is used for acceptance filtering. For mailbox 15, it functions as local acceptance mask enable bit . Identifier extension bit 0 Standard format (11-bit identifier) Identifiers to are used. 1 Extended format (29-bit identifier) Identifiers to are used.
The priority of a message ID becomes so high that 0 continues from the MSB ( bit) of ID. Note: When ID of the received remote frame is corresponding to ID of the transmission mailbox =1 and =1, ID of remote frame is overwritten to this mailbox. Afterward, it responds applying overwritten ID automatically.
92CD54I-217
2006-01-27
TMP92CD54I
Message Identifier Field 1 (MI1)
Message Identifier Field 1 Low MBnMI1L (MBn+02H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
7 ID7 -
6 ID6 -
5 ID5 -
4 ID4 R/W -
3 ID3 -
2 ID2 -
1 ID1 -
0 ID0 -
Identifiers to are stored. Message Identifier Field 1 High MBnMI1H (MBn+03H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
15 ID15 -
14 ID14 -
13 ID13 -
12 ID12 R/W -
11 ID11 -
10 ID10 -
9 ID9 -
8 ID8 -
Identifiers to are stored.
Note1: For standard format, identifiers to are indeterminate. Note2 : Set the mailbox ID at initial configuration. When rewriting to MI0 or MI1 field of the mailbox which is permitted, after forbidding a mailbox by resetting the bit, and then carry out. However, reception is stopped, when it resets to =0, while a mailbox is receiving. When a mailbox is transmitting (=1), after transmission is completed (=0), please rewrite the MI0 or MI1 field.
92CD54I-218
2006-01-27
TMP92CD54I
Message Control Field (MCF)
Message Control Field Low MBnMCFL (MBn+04H) bit Symbol Read/Write Read modify-write After reset
instructions prohibited.
7
6
5
4 RTR -
3 DLC3 -
2 DLC2 R/W -
1 DLC1 -
0 DLC0 -
Remote transmit request bit 0 1 Data frame Remote fame
Data length code 0000 0001 0010 0011 0100 0101 0110 0111 1000
Data Bytes 0 byte 1 byte 2 bytes 3 bytes 4 bytes 5 bytes 6 bytes 7 bytes 8 bytes
Corresponding Mailbox Data None D0 D1, D0 D2, D0, D0 D3, D2, D1, D0 D4, D3, D2, D1, D0 D5, D4, D3, D2, D1, D0 D6, D5, D4, D3, D2, D1, D0 D7, D6, D5, D4, D3, D2, D1, D0
Note: Do not use data length codes other than those listed above.
Message Control Field High MBnMCFH (MBn+05H) bit Symbol Read/Write Read modify-write After reset
instructions prohibited.
15
14
13
12
11
10
9
8
In the case of a receiving mailbox, there is no necessity for an initial configuration. RTR and DLC of the received message are stored in the MCF register. In the case of a transmitting mailbox, please set at the initial configuration.
92CD54I-219
2006-01-27
TMP92CD54I
Data field (D0 to D7) This is a read/write register that stores up to 8 bytes of transmit/receive data. However, in the case of receive mailboxes, the write access to the data field is disabled. For transmit, data in a length of bytes set by the mailbox's data length code is transmitted. For receive, the data length code in the receive message is copied to the mailbox's data length code, so that the byte in a length equal to this data length code is receives as valid data.
Data Field 0 MBnD0 (MBn+06H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
7 D07 -
6 D06 -
5 D05 -
4 D04 R/W -
3 D03 -
2 D02 -
1 D01 -
0 D00 -
Data Field 1 MBnD1 (MBn+07H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
15 D17 -
14 D16 -
13 D15 -
12 D14 R/W -
11 D13 -
10 D12 -
9 D11 -
8 D10 -
Data Field 2 MBnD2 (MBn+08H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
7 D27 -
6 D26 -
5 D25 -
4 D24 R/W -
3 D23 -
2 D22 -
1 D21 -
0 D20 -
Data Field 3 MBnD3 (MBn+09H) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
15 D37 -
14 D36 -
13 D35 -
12 D34 R/W -
11 D33 -
10 D32 -
9 D31 -
8 D30 -
Data Field 4 MBnD4 (MBn+0AH) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
7 D47 -
6 D46 -
5 D45 -
4 D44 R/W -
3 D43 -
2 D42 -
1 D41 -
0 D40 -
Data Field 5 MBnD5 (MBn+0BH) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
15 D57 -
14 D56 -
13 D55 -
12 D54 R/W -
11 D53 -
10 D52 -
9 D51 -
8 D50 -
Data Field 6 MBnD6 (MBn+0CH) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
7 D67 -
6 D66 -
5 D65 -
4 D64 R/W -
3 D63 -
2 D62 -
1 D61 -
0 D60 -
Data Field 7 MBnD7 (MBn+0DH) bit Symbol Read/Write Read After reset modify-write
instructions prohibited.
15 D77 -
14 D76 -
13 D75 -
12 D74 R/W -
11 D73 -
10 D72 -
9 D71 -
8 D70 -
92CD54I-220
2006-01-27
TMP92CD54I
Time Stamp Value (TSV)
Time Stamp Value Low MBnTSVL (MBn+0EH) bit Symbol Read/Write After reset 7 TSV7 6 TSV6 5 TSV5 4 TSV4 R 3 TSV3 2 TSV2 1 TSV1 0 TSV0
Time Stamp Value High MBnTSVH (MBn+0FH) bit Symbol Read/Write After reset 15 TSV15 14 TSV14 13 TSV13 12 TSV12 R 11 TSV11 10 TSV10 9 TSV9 8 TSV8
This is a 16-bit read only register into which the value of the time stamp counter is loaded when data is successfully transmitted or received. The counter value is not loaded this register when transmit or receive operation failed.
92CD54I-221
2006-01-27
TMP92CD54I 3.12.3 Control registers
Mailbox configuration register (MC)
Mailbox Configuration Register Low MCL (0300H) bit Symbol Read/Write After reset 7 MC7 0 6 MC6 0 5 MC5 0 4 MC4 R/W 0 0 0 0 0 3 MC3 2 MC2 1 MC1 0 MC0
Mailbox Configuration Register High MCH (0301H) bit Symbol Read/Write After reset 15 MC15 0 14 MC14 0 13 MC13 0 12 MC12 R/W 0 0 0 0 0 11 MC11 10 MC10 9 MC9 8 MC8
Each bit corresponds to mailbox 0 through 15. Each mailbox can be enabled or disabled. When = 0, access to mailbox "n" is disabled. When = 1, access to mailbox "n" is enabled. Set the mailbox ID at the initial configuration. Before rewriting the mailbox's MI0 or MI1 field, be sure to clear the bit to disable the corresponding mailbox. However, when bit is cleared to 0 during reception, the reception is stopped immediately. When a mailbox is transmitting (=1), please rewrite the MI0 or MI1 field after transmission is completed (=0). The transmit mailbox data and control fields can be accessed for write at any time. However, in the case of transmit mailboxes with the bit is set to 1, the write access to the message control field is enabled during the bit is cleared to 0. Mailbox direction register (MD)
Mailbox Direction Register Low MDL (0302H) bit Symbol Read/Write After reset 7 MD7 0 6 MD6 0 5 MD5 0 4 MD4 R/W 0 0 0 0 0 3 MD3 2 MD2 1 MD1 0 MD0
Mailbox Direction Register High MDH (0303H) bit Symbol Read/Write After reset 15 MD15 R 1 14 MD14 0 13 MD13 0 12 MD12 0 11 MD11 R/W 0 10 MD10 0 9 MD9 0 8 MD8 0
Each bit corresponds to mailbox 0 through 15. Each mailbox except mailbox 15 can be directed for transmit or receive. When = 0, the mailbox MBn is directed for transmit. When = 1, the mailbox MBn is directed for receive. Mailbox 15 is a receive-only mailbox, so that bit is fixed to "1". This bit can only be read; you cannot write to it. Set the MD register at initial configuration. When changing MD register, please carry out after clearing bit of a corresponding mailbox.
92CD54I-222
2006-01-27
TMP92CD54I
(1) Transmit control registers Transmission request set register (TRS)
Transmission Request Set Register Low TRSL (0304H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 TRS7 0
6 TRS6 0
5 TRS5 0
4 TRS4 R/S 0
3 TRS3 0
2 TRS2 0
1 TRS1 0
0 TRS0 0
Transmission Request Set Register High TRSH (0305H)
Read modify-write instructions prohibited.
15 bit Symbol Read/Write After reset
14 TRS14 0
13 TRS13 0
12 TRS12 0
11 TRS11 R/S 0
10 TRS10 0
9 TRS9 0
8 TRS8 0
Each bit corresponds to mailboxes 0 through 15. Since mailbox 15 is a receive-only mailbox, bit 15 is nonexistent. If after writing data and identifier to mailbox "n" that has directed for transmit ( = 0) the bit is set to 1 when the said mailbox is enabled ( = 1), a message is transmitted from mailbox "n". If there are multiple transmit requests, messages are transmitted sequentially. The order in which messages are transmitted depends on the master control register MCR bit 3 . If bit is clear to 0, the mailbox with the lower number has the higher priority. For example: if the mailboxes MB0, MB2 and MB5 are configured for transmission and the corresponding TRS bits are set to 1, then the messages will be transmitted in the following order: MB0, MB2 and MB5. If a new transmission request is set for MB0 during the processing of MB2 then in the next internal arbitration-run MB0 will be selected for the next transmission. This will also happen, when the CAN controller loses arbitration while transmitting MB2. In this case, MB0 will be sent at the next opportunity instead of MB2. If bit is set to "1", the priority of the identifier stored in the mailbox will determine the sending order. The mailbox with the higher priority identifier will be sent first. In case of a lost arbitration on the CAN bus line a new internal arbitration run will be started and the message with the highest priority will be sent at next possible time. The bit is reset when transmit has succeeded or when the transmission request concerned is cleared by setting the bit to 1. If transmit has failed, transmit is retried repeatedly until it succeeds or the transmission request concerned is cleared by setting the bit to 1. When the bit is "1", the write access to the corresponding mailbox is denied. The bit cannot be set from the CPU if mailbox "n" is directed for receive. When mailbox "n" is directed for transmit, the bit is set by writing a "1" from the CPU and is cleared to 0 by the internal logic. Writing a "0" from the CPU has no effect.
92CD54I-223
2006-01-27
TMP92CD54I
Transmission request reset register (TRR)
Transmission Request Reset Register Low TRRL (0306H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 TRR7 0
6 TRR6 0
5 TRR5 0
4 TRR4 R/S 0
3 TRR3 0
2 TRR2 0
1 TRR1 0
0 TRR0 0
Transmission Request Reset Register High TRRH (0307H)
Read modify-write instructions prohibited.
15 bit Symbol Read/Write After reset
14 TRR14 0
13 TRR13 0
12 TRR12 0
11 TRR11 R/S 0
10 TRR10 0
9 TRR9 0
8 TRR8 0
Each bit corresponds to mailboxes 0 through 15. Since mailbox 15 is a receive-only mailbox, bit 15 is nonexistent. If the bit is set to "1", the transmit request that has been asserted by setting the corresponding bit is canceled. This cancellation takes place in one of the following three ways: If a message has not been transmitted yet, the message transmit request is canceled. ( = 0, = 0, = 1) If a message is currently being transmitted but a lost arbitration or an error occurs, the message transmit request is cleared and transmit operation is aborted. ( = 0, = 0, = 1) If a message is currently being transmitted and no lost arbitration or error occurs, transmit operation is completed without ever clearing the message transmit request. ( = 0, = 0, = 1) When the bit is "1", the write access to the corresponding mailbox is denied. The bit cannot be set from the CPU if mailbox "n" is directed for receive. When mailbox "n" is directed for transmit the bit is set by writing a "1" from the CPU and is cleared to 0 by the internal logic in case of a successful transmission or an aborted transmission. Writing a "0" from the CPU has no effect.
92CD54I-224
2006-01-27
TMP92CD54I
Transmission acknowledge register (TA)
Transmission Acknowledge Register Low TAL (0308H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 TA7 0
6 TA6 0
5 TA5 0
4 TA4 R/C 0
3 TA3 0
2 TA2 0
1 TA1 0
0 TA0 0
Transmission Acknowledge Register High TAH (0309H)
Read modify-write instructions prohibited.
15 bit Symbol Read/Write After reset
14 TA14 0
13 TA13 0
12 TA12 0
11 TA11 R/C 0
10 TA10 0
9 TA9 0
8 TA8 0
Each bit corresponds to mailboxes 0 through 15. Since mailbox 15 is a receive-only mailbox, bit 15 is nonexistent. The bit is set when the message of mailbox "n" has been transmitted successfully. In this case, a transmission successful interrupt is generated if it has been enabled. The bit is cleared to 0 by writing a "1" to the bit or the bit from the CPU. Writing a "0" from the CPU has no effect. Abort acknowledge register (AA)
Abort Acknowledge Register Low AAL (030AH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 AA7 0
6 AA6 0
5 AA5 0
4 AA4 R/C 0
3 AA3 0
2 AA2 0
1 AA1 0
0 AA0 0
Abort Acknowledge Register High AAH (030BH)
Read modify-write instructions prohibited.
15 bit Symbol Read/Write After reset
14 AA14 0
13 AA13 0
12 AA12 0
11 AA11 R/C 0
10 AA10 0
9 AA9 0
8 AA8 0
Each bit corresponds to mailboxes 0 through 15. Since mailbox 15 is a receive-only mailbox, bit 15 is nonexistent. The bit is set when the transmission of the message of mailbox "n" has been aborted. In this case, a global interrupt (transmit abort) is generated if it has been enabled. The bit is cleared to 0 by writing a "1" to the bit or the bit from the CPU. Writing a "0" from the CPU has no effect.
92CD54I-225
2006-01-27
TMP92CD54I
Change data request register (CDR)
Change Data Request Register Low CDRL (032AH) bit Symbol Read/Write After reset 7 CDR7 0 6 CDR6 0 5 CDR5 0 4 CDR4 R/W 0 0 0 0 0 3 CDR3 2 CDR2 1 CDR1 0 CDR0
Change Data Request Register High CDRH (032BH) 15 bit Symbol Read/Write After reset 14 CDR14 0 13 CDR13 0 12 CDR12 0 11 CDR11 R/W 0 10 CDR10 0 9 CDR9 0 8 CDR8 0
Each bit corresponds to mailboxes 0 through 15. Since mailbox 15 is a receive-only mailbox, bit 15 is nonexistent. If the bit is 1, a transmission request for mailbox "n" will be ignored. That means, that a mailbox "n" with the and bit is set to 1, it will not be considered in the internal arbitration-run: the mailbox "n" is locked for transmission. The processing of mailbox "n" in the arbitration-run will be considered again after clearing the bit. The bit is useful for dealing with remote frames. It is intended for updating the data field of a transmit mailbox, which is configured for automatic reply to remote frames (the bit is set). By using the bit, the user can update the data field without a need of taking additional care of the data consistency.
92CD54I-226
2006-01-27
TMP92CD54I
(2) Receive control registers The identifier of each incoming message is compared with the identifiers held in the mailboxes that have been directed for receive operation. The comparison of the identifiers depends on the value of the global/local acceptance mask enable bits / in the mailbox and the data held in the global/local acceptance mask registers GAM/LAM. When a matching identifier is detected, the received identifier, control bits, and data bytes are written to the mailbox that has matched. At this time, the corresponding receive message pending bit is set and receive successful interrupt is generated if it has been enabled. Once a matching identifier is found, no other identifiers are compared. If not match is detected, the message is rejected. The CPU must reset the bit after reading the data. If a second message is received for this mailbox when the bit has already been set to 1, the corresponding receive message lost bit is set to 1. In this case, the data stored in mailbox "n" is overwritten with the new data. In this case, a global interrupt (receive message lost) is generated if it has been enabled. Receive-only mailbox Only if the identifier of a received message does not match any identifiers of the mailboxes 0 through 14, the identifier is compared with the identifier of the receive-only mailbox 15. When a matching identifier is detected, the contents of the received message are written to the mailbox 15. Receive message pending register (RMP)
Receive Message Pending Register Low RMPL (030CH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 RMP7 0
6 RMP6 0
5 RMP5 0
4 RMP4 R/C 0
3 RMP3 0
2 RMP2 0
1 RMP1 0
0 RMP0 0
Receive Message Pending Register High RMPH (030DH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
15 RMP15 0
14 RMP14 0
13 RMP13 0
12 RMP12 0
11 RMP11 R/C 0
10 RMP10 0
9 RMP9 0
8 RMP8 0
Each bit corresponds to mailbox 0 through 15. When a message is received and its content is stored in mailbox "n", the bit is set to 1. If a second message is received by mailbox "n" for which the bit has been set to 1, mailbox "n" is overwritten with the new data. In this case, the corresponding bit is set. The bit is set to 1 by the internal logic and is cleared by writing a "1" to the bit from the CPU. The CPU cannot write a 0 to bit.
92CD54I-227
2006-01-27
TMP92CD54I
Receive message lost register (RML)
Receive Message Lost Register Low RMLL (030EH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 RML7 0
6 RML6 0
5 RML5 0
4 RML4 R/C 0
3 RML3 0
2 RML2 0
1 RML1 0
0 RML0 0
Receive Message Lost Register High RMLH (030FH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
15 RML15 0
14 RML14 0
13 RML13 0
12 RML12 R/C 0
11 RML11 0
10 RML10 0
9 RML9 0
8 RML8 0
Each bit corresponds to mailbox 0 through 15. If a second message is received by mailbox "n" for which the bit has been set to 1, mailbox "n" is overwritten with the new data and the bit is set to 1. The bit is set by the internal logic and is cleared to 0 by writing a "1" to the bit from the CPU. Writing a "0" to bit and writing a "1" or "0" to bit from the CPU have no effect.
ID Unmatched
Before Don't care
0 Matched 1
Table 3.12.2 Operation when message is received After Operation No No The data in receive buffer hasn't been transferred to any change change mailbox. The data in receive buffer is transferred to a mailbox which matched the identifier of incoming message. (Old data in the No 1 mailbox was read out, and cleared to 0. Then, the change mailbox is written with new data; RECEIVE MESSAGE PENDING BIT is set.) The data in receive buffer is transferred to a mailbox which matched the identifier of incoming message (Old data is in the mailbox. Then, the mailbox is overwritten with new data; 1 1 RECEIVE MESSAGE LOST BIT and RECEIVE MESSAGE PENDING BIT are set).
92CD54I-228
2006-01-27
TMP92CD54I
(3) Handling of remote frames If a remote frame is received, it is compared with the identifiers of all mailboxes. The comparison of identifiers depends on the value of the global/local acceptance mask enable bits / in the mailbox and the data held in the global/local acceptance mask registers GAM/LAM. If a received remote frame matches the identifier of a mailbox that is directed for transmit and the bit for that mailbox is set to 1, the bit is set to 1 in order to send a message in response to the remote frame. Even when there is a matching identifier, if the bit for that mailbox is reset (even though it may be a transmit mailbox), the remote frame is not responded to. If there is a matching identifier and this mailbox is directed for receive, the remote frame is processed as data frame, in which case the and bits are set. Once a matching identifier is found, no other identifiers are compared. Table 3.12.3 Operation when Remote Frame is Received Mailbox bit Handling of Remote Frame Transmit 0 Not responded to. 1 Responded to. ( bit is set) *Note Receive 1/0 Not responded to. Processed as data frame. ( and bits are set.) Transmit/Receive 1/0 Not responded to.
ID Matched
Unmatched
Note : When = 1 of this mail box, ID of remote frame is overwritten to this mailbox. and carries out an automatic response by new ID. Remote frame pending register (RFP)
Remote Frame Pending Register Low RFPL (032CH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 RFP7 0
6 RFP6 0
5 RFP5 0
4 RFP4 R/C 0
3 RFP3 0
2 RFP2 0
1 RFP1 0
0 RFP0 0
Remote Frame Pending Register High RFPH (032DH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
15 RFP15 0
14 RFP14 0
13 RFP13 0
12 RFP12 R/C 0
11 RFP11 0
10 RFP10 0
9 RFP9 0
8 RFP8 0
When a remote frame is received by mailbox "n" directed for receive the corresponding and bits are set. The bit is cleared to 0 by writing a "1" to the bit. Writing a "0" has no effect. Also, the bit is reset automatically when the remote frame received in mailbox "n" is overwritten by a newly received data frame.
92CD54I-229
2006-01-27
TMP92CD54I
(4) Acceptance filter The global acceptance mask registers GAM0 and GAM1 are used for filtering messages when the bit for mailboxes 0 through 14 is set to "1". An incoming message is stored in the first mailbox with a matching identifier. Only if there is no matching identifier in the mailboxes 0 to 14, the incoming message is compared with the mailbox 15, a receive-only mailbox. The local acceptance mask registers LAM0, LAM1 are used for filtering messages when the bit for mailbox 15 is set. Mailbox identifier Acceptance mask register
Receive request
Received message identifier Figure 3.12.2 Acceptance Filter
92CD54I-230
2006-01-27
TMP92CD54I
Local acceptance mask registers (LAM0, LAM1)
Local Acceptance Mask Register 0 Low LAM0L (0310H) bit Symbol Read/Write After reset 7 LAM23 0 6 LAM22 0 5 LAM21 0 4 3 LAM20 LAM19 R/W 0 0 2 LAM18 0 1 LAM17 0 0 LAM16 0
Local Acceptance Mask Register 0 High LAM0H (0311H) bit Symbol Read/Write After reset 15 LAMI R/W 0 14 13 12 LAM28 0 11 LAM27 0 10 LAM26 R/W 0 9 LAM25 0 8 LAM24 0
Local Acceptance Mask Register 1 Low LAM1L (0312H) bit Symbol Read/Write After reset 7 LAM7 0 6 LAM6 0 5 LAM5 0 4 LAM4 R/W 0 0 0 0 0 3 LAM3 2 LAM2 1 LAM1 0 LAM0
Local Acceptance Mask Register 1 High LAM1H (0313H) bit Symbol Read/Write After reset 15 LAM15 0 14 LAM14 0 13 LAM13 0 12 11 LAM12 LAM11 R/W 0 0 10 LAM10 0 9 LAM9 0 8 LAM8 0
The LAM0 and LAM1 registers are used for only filtering messages for mailbox 15. This feature allows the user to choose whether or not to locally mask any identifier bit of the incoming message for mailbox 15. Incoming messages are first checked to see if they match mailboxes 0 to 14 before being forwarded to mailbox 15. If the bit is "0", messages are received only when the corresponding bit of the incoming message identifier matches that of the mailbox identifier. If the bit is "1", messages are received regardless of whether the corresponding bit of the incoming message identifier is "0" or "1". The GAM0 and GAM1 registers do not affect mailbox 15. For messages in extended format, the identifier extension bit and the whole 29bits of the identifier are compared. For messages in standard format, only the bit and the first 11bits of the identifier ( to ) are compared. The bit (local acceptance mask identifier extension bit) is used to mask the bit of mailbox 15. If the bit is "0", messages in extended or standard format are received according to the bit of mailbox 15. If the bit is "1", messages in both extended and standard formats are received regardless of whether the bit of mailbox 15 is "0" or "1". For messages in extended format, the whole 29bits of the mailbox identifier and the whole 29 mask bits of the LAM register are used for filtering. For messages in standard format, only the first 11bits of the mailbox identifier ( to ) and the first 11 bits of the LAM register ( to ) are used for filtering. Please perform the setup of LAM0 and LAM1 at initial configuration. Please do not change a setup during operation. When setting change is performed during reception, receiving message ID is compared for the receiving mask information in the middle of setting change.
92CD54I-231
2006-01-27
TMP92CD54I
Global acceptance mask registers (GAM0, GAM1)
Global Acceptance Mask Register 0 Low GAM0L (0314H) bit Symbol Read/Write After reset 7 GAM23 0 6 GAM22 0 5 GAM21 0 4 3 GAM20 GAM19 R/W 0 0 2 GAM18 0 1 GAM17 0 0 GAM16 0
Global Acceptance Mask Register 0 High GAM0H (0315H) bit Symbol Read/Write After reset 15 GAMI R/W 0 14 13 12 GAM28 0 11 GAM27 0 10 GAM26 R/W 0 9 GAM25 0 8 GAM24 0
Global Acceptance Mask Register 1 Low GAM1L (0316H) bit Symbol Read/Write After reset 7 GAM7 0 6 GAM6 0 5 GAM5 0 4 GAM4 R/W 0 0 0 0 0 3 GAM3 2 GAM2 1 GAM1 0 GAM0
Global Acceptance Mask Register 1 High GAM1H (0317H) bit Symbol Read/Write After reset 15 GAM15 0 14 GAM14 0 13 GAM13 0 12 11 GAM12 GAM11 R/W 0 0 10 GAM10 0 9 GAM9 0 8 GAM8 0
The GAM0 and GAM1 registers are used for filtering messages for mailbox 0 to 14. If the bit for mailboxes 0 to 14 is set to 1 the GAM0 and GAM1 registers are used for incoming messages. A received message is stored in only the first mailbox with a matching identifier. If the bit is "0", messages are received only when the corresponding bit of the incoming message identifier matches that of the mailbox identifier. If the bit is "1", messages are received regardless of whether the corresponding bit of the incoming message identifier is "0" or "1". For messages in extended format, the identifier extension bit and the whole 29bits of the identifier are compared. For messages in standard format, only the bit and the first 11bits of the identifier ( to ) are compared. The bit (global acceptance mask identifier extension bit) is used to mask the bits of mailbox 0 to 14. If the bit is "0", messages in extended or standard format are received according to the bits of mailbox 0 to 14. If the bit is "1", messages in both extended and standard formats are received regardless of whether the bits of mailbox 0 to 14 are "0" or "1". For messages in extended format, the whole 29bits of the mailbox identifier and the whole 29 mask bits of the GAM register are used for filtering. For messages in standard format, only the first 11bits of the mailbox identifier ( to ) and the first 11 bits of the GAM register ( to ) are used for filtering. Please perform the setup of GAM0 and GAM1 at initial configuration. Please do not change a setup during operation. When setting change is performed during reception, receiving message ID is compared for the receiving mask information in the middle of setting change.
92CD54I-232
2006-01-27
TMP92CD54I
(5) Control registers Master control register (MCR)
Master Control Register Low MCRL (0318H) bit Symbol Read/Write After reset 7 CCR 1 6 SMR 0 5 HMR R/W 0 4 WUBA 0 3 MTOS 0 2 1 TSCC W 0 0 0 SRES
Master Control Register High MCRH (0319H) 15 bit Symbol Read/Write After reset 14 13 12 11 10 9 8 TSTLB TSTERR R/W 0 0
TSTLB: Test Loop Back 0: Cancels the test loop back mode. (Normal operation) 1: Requests the test loop back mode. This mode supports stand-alone operation. TSTERR: Test Error 0: Cancels the test error mode. (Normal operation) 1: Requests the test error mode. In this mode it is possible to write the error counter register CEC. CCR: Change Configuration Request 0: Cancels the configuration mode. (Normal operation) 1: Request the configuration mode. This mode allows for writing to the bit configuration registers BCR1, BCR2. SMR: Sleep Mode Request 0: The sleep mode is not requested. (Normal operation) 1: Requests the sleep mode. When this mode is entered, the CAN controller clock stops oscillating and the error counter and transmit requests are cleared. HMR: Halt Mode Request 0: Cancels the halt mode. (Normal operation) 1: Requests the halt mode. When this mode entered, the CAN controller does no longer transmit and receive messages. It only sends error and acknowledge flags. WUBA: Wake Up on Bus Activity 0: Wakes up the module only by detecting a write access to the MCR register. 1: Wakes up the module when active bus state is detected or by detecting a write access to the MCR register. MTOS: Mailbox Transmission Order Select 0: Mailbox transmission order by mailbox number. The mailbox with the lower number will be sent first. 1: Mailbox transmission order by identifier priority. The mailbox with the higher priority identifier will be sent first.
92CD54I-233
2006-01-27
TMP92CD54I
TSCC: Time Stamp Counter Clear 0: No effect 1: The time stamp counter will be cleared to 0. Note 1: This is a write-only bit; it is always "0" when read. Note 2: The time stamp counter is also cleared to 0 by a write to the TSP register, or writing a "0" to the TSC register. SRES: Software Reset 0: No effect 1: Resets the CAN controller in software. All internal registers are initialized. Note: This is a write-only bit; it is always "0" when read.
Bit configuration register 1 (BCR1)
Bit Configuration Register 1 Low BCR1L (031CH) bit Symbol Read/Write After reset 7 BRP7 0 6 BRP6 0 5 BRP5 0 4 BRP4 R/W 0 0 0 0 0 3 BRP3 2 BRP2 1 BRP1 0 BRP0
is the baud rate prescaler value. It can be set in the range of 0 to 255.
Bit Configuration Register 1 High BCR1H (031DH) 15 bit Symbol Read/Write After reset 14 13 12 11 10 9 8
92CD54I-234
2006-01-27
TMP92CD54I
Bit configuration register 2 (BCR2)
Bit Configuration Register 2 Low BCR2L (031EH) bit Symbol Read/Write After reset 7 SAM 0 6 TSEG22 0 5 TSEG21 0 4 3 TSEG20 TSEG13 R/W 0 0 2 TSEG12 0 1 TSEG11 0 0 TSEG10 0
Setting of SAM Sampling Time 0 1 1 3
Setting of TSEG2 Unit Time of TSCL 000 Not available 001 2xTSCL 010 3xTSCL 011 4xTSCL 100 5xTSCL 101 6xTSCL 110 7xTSCL 111 8xTSCL
Setting of TSEG1 Unit Time of TSCL 0000 Not available 0001 2xTSCL 0010 3xTSCL 0011 4xTSCL 0100 5xTSCL 0101 6xTSCL 0110 7xTSCL 0111 8xTSCL 1000 9xTSCL 1001 10xTSCL 1010 11xTSCL 1011 12xTSCL 1100 13xTSCL 1101 14xTSCL 1110 15xTSCL 1111 16xTSCL
Bit Configuration Register 2 High BCR2H (031FH) 15 bit Symbol Read/Write After reset 14 13 12 11 10 9 SJW1 R/W 0 0 8 SJW0
Setting of SJW Adjust Time 00 1xTSCL 01 2xTSCL 10 3xTSCL 11 4xTSCL
The bit length is determined by parameters TSEG1, TSEG2, and BRP. All CAN controllers on the CAN bus must operate at the same baud rate. If individual CAN controllers operate with different frequencies the baud rate has to be adjusted by the mentioned parameters. In the bit timing logic, the conversion of the parameters to the required bit timing is materialized. The configuration registers BCR1 and BCR2 contains the data about the bit timing.
92CD54I-235
2006-01-27
TMP92CD54I
1 Bit Time
SYNCSEG SJW TSEG1 TSEG2 SJW
TSCL
IPT
Sample Point
Figure 3.12.3 The length of TSCL is defined by: TSCL = (+1) / fIO
Bit Timing
(fIO = fc divided by 2) fIO is used to the CAN controller system clock frequency (input clock of the CAN controller). The length of one bit is determined by the equation below: 1 Bit Time = SYNCSEG+TSEG1+TSEG2 1 bit time is equal or greater than 10/fIO.
The synchronization segment SYNCSEG has always the length of 1xTSCL. The length of TSEG1 should be equal or greater than the length of TSEG2. TSEG1 TSEG2. The baud rate is defined by: Baud rate = fIO/[(+1)x((+1)+(+1)+1)] IPT (information processing time) is the time segment starting with the sample point reserved for processing of the sampled bit level. IPT is equal to 3 fIO clock cycles. The parameter SJW (2bit) indicates by how many units of TSCL is allowed to be lengthened or to be shortened when re-synchronizing. Values between 1 (SJW = 00b) and 4 (SJW = 11b) are adjustable. The bus line is re-synchronized at each falling edge. The maximum length of SJW is equal to the length of TSEG2. SJW TSEG2 With the corresponding bit timing, it is possible to reach a multiple sampling of the bus line at the sample point by setting bit. The level determined by the CAN bus then corresponds to the result from the majority decision of the last three values. The three-time sampling is not allowed for < 4. For < 4 always a one-time sampling will be performed regardless of the value of bit. There is a restriction as follows:
0 1 >1 TSCL length (CAN clock cycles : fIO) 1 2 +1 IPT length (CAN clock cycles : fIO) 3 3 3 TSEG2 minimum length (TSCL) 3 2 2
92CD54I-236
2006-01-27
TMP92CD54I
Example1: A transmission rate of 1Mbps will be adjusted, i.e. a bit has a length of 1s. The CAN input clock frequency fIO is 10MHz. The baud rate prescaler is set to "0". That means a bit for this data transmission rate has to be programmed with a length of 10xTSCL. Since SYNCSEG is 1xTSCL, it is set as 9xTSCL by TSEG1+TSEG2. E.g. = 00H = 0100B (5xTSCL) = 011B (4xTSCL) In this case, sampling point is 60%. With this setting a threefold sampling of the bus is not possible ( < 4), thus SAM = 0 should be set. SJW is not allowed to be greater than TSEG2, so the maximum value could be set to = 11B (4xTSCL) Example2: Baud rate : 500kbps Sampling point : 80% fIO : 10MHz (a) In case of = 00H TSCL = (+1) / fIO = 1 / 10MHz = 100ns 1 bit time = 2s / 100ns = 20xTSCL = 1110B (15xTSCL) = 011B (4xTSCL) (b) In case of = 01H TSCL = (+1) / fIO = 2 / 10MHz = 200ns 1 bit time = 2s / 200ns = 10xTSCL = 0110B (7xTSCL) = 001B (2xTSCL) Example3: Baud rate : 500kbps Sampling point : 85% fIO : 10MHz (a) In case of = 00H TSCL = (+1) / fIO = 1 / 10MHz = 100ns 1 bit time = 2s / 100ns = 20xTSCL = 1111B (16xTSCL) = 010B (3xTSCL) (b) In case of = 01H TSCL = (+1) / fIO = 2 / 10MHz = 200ns 1 bit time = 2s / 200ns = 10xTSCL In this case, 85% sampling point cannot be set up. ( 1 bit time = 2s ) ( 1 bit time = 2s )
92CD54I-237
2006-01-27
TMP92CD54I
Time stamp feature There is a free-running 16-bit time stamp counter TSC implemented in the CAN controller to get an indication of the time of reception or transmission of messages. The content of the TSC is written into the time stamp value TSV of the corresponding mailbox when a received message has been stored or a message has been transmitted. The TSC is driven from the bit clock of the CAN bus line. When the CAN controller is in configuration mode or sleep mode, the TSC will be stopped. After a reset, the TSC can be cleared to 0 by writing a value to the time stamp counter prescaler TSP. The TSC can be written and read by CPU in configuration mode and in normal operation mode. Time stamp counter register (TSC)
Time Stamp Counter Register Low TSCL (0332H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 TSC7 0
6 TSC6 0
5 TSC5 0
4 TSC4 R/W 0
3 TSC3 0
2 TSC2 0
1 TSC1 0
0 TSC0 0
Time Stamp Counter Register High TSCH (0333H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
15 TSC15 0
14 TSC14 0
13 TSC13 0
12 11 TSC12 TSC11 R/W 0 0
10 TSC10 0
9 TSC9 0
8 TSC8 0
Overflow of the TSC can be detected by the time stamp counter overflow flag of the global status register GSR and the time stamp counter overflow interrupt flag of the global interrupt flag register GIF. Both flags are cleared to 0 by writing a "1" to the corresponding bit location in GIF. There is a 4-bit prescaler for the TSC. It is the time stamp counter prescaler register TSP that stores the value to be reloaded into this prescaler. After reset, the TSP register is cleared to "0", so a value "0" is loaded into the prescaler. The TSC counter's count-up period, TTSC, is shown below: TTSC = TBITx(+1) (TBIT : bit cycle)
92CD54I-238
2006-01-27
TMP92CD54I
Time stamp counter prescaler register (TSP)
Time Stamp Counter Prescaler Register Low TSPL (0330H) 7 bit Symbol Read/Write After reset 6 5 4 3 TSP3 0 Time Stamp Counter Prescaler Register High TSPH (0331H) 15 bit Symbol Read/Write After reset 14 13 12 11 10 9 8 2 TSP2 R/W 0 0 0 1 TSP1 0 TSP0
To be sure, that the value of the TSC will not change during the write cycle to the mailbox, there is a hold register implemented. The value of the TSC will be copied to this register if a message has been received or transmitted successfully. The reception is successful for the receiver, if there is no error until the last but one bit of End-of-frame. The transmission is successful for the transmitter, if there is no error until the last bit of End-of-frame. (Refer to the CAN version 2.0B)
Time Stamp Counter Prescaler CPU read/write Register Re-load value CAN bus bit clock
Prescaler
clear
(4bit)
Count-up clock
Hardware reset Software reset
CPU read/write
Time Stamp Counter Register
clear Hardware reset Software reset Entering sleep mode Entering configuration mode Write to TSP register clear
Transmission successful Reception successful
load
Time Stamp Counter Hold Register (16bit)
Mailbox Figure 3.10.4 Time Stamp Counter
The free running time stamp counter and the time stamp hold register will be cleared in the following cases: After reset (hardware reset or software reset) When the module enters configuration mode When the module enters sleep mode When a write access to the time stamp prescaler register is performed
92CD54I-239
2006-01-27
TMP92CD54I
(6) Status registers Global status register (GSR)
Global Status Register Low GSRL (031AH) bit Symbol Read/Write After reset 7 CCE 1 6 SMA R 0 5 HMA 0 Global Status Register High GSRH (031BH) 15 bit Symbol Read/Write After reset 14 13 MsgInSlot<3:0> R 1 1 1 1 0 0 12 11 RM 10 TM 9 8 4 3 TSO 0 2 BO R 0 0 0 1 EP 0 EW
MsgInSlot: Message In Slot Indicates a message in the transmission slot. 0000: Message of mailbox 0 0001: Message of mailbox 1 : 1110: Message of mailbox 14 1111: No transmission message RM: Receive Mode 0: The CAN controller is not receiving a message. 1: The CAN controller is receiving a message. That means the CAN controller is not the transmission of the message and the bus is not idle. TM: Transmit Mode 0: The CAN controller is not transmitting a message. 1: The CAN controller is transmitting a message. That means the CAN controller stays transmitter until the bus is idle or it loses arbitration. CCE: Change Configuration Enable 0: The CAN controller is not in the configuration mode. (Normal operation) 1: The CAN controller has entered the configuration mode. SMA: Sleep Mode Acknowledge 0: The CAN controller is not in the sleep mode. (Normal operation) 1: The CAN controller has entered the sleep mode. HMA: Halt Mode Acknowledge 0: The CAN controller is not in the halt mode. (Normal operation) 1: The CAN controller has entered the halt mode. TSO: Time Stamp Overflow Flag 0: There was no overflow of the time stamp counter. 1: There was at least one overflow of the time stamp counter since this bit has been cleared to 0. To clear this bit, clear the bit to 0 in the GIF register.
92CD54I-240
2006-01-27
TMP92CD54I
BO: Bus Off Status 0: The CAN controller is in the bus on status. (Normal operation) 1: The CAN controller is in the bus off status. There is an abnormal rate of occurrences of errors on the CAN bus. This condition occurs when the transmit error counter TEC has reached the limit of 256. During bus off no messages can be received or transmitted. The CAN controller will go to bus on automatically after the bus off recovery sequence. After entering bus off, the error counters are undefined. EP: Error Passive Status 0: The CAN controller is in the error active mode. Both values of the error counters TEC and REC are less than 128. 1: The CAN controller is in the error passive mode. At least one of the error counters has reached the error passive status of 128. EW: Warning Status 0: Both values of the error counters TEC and REC are less than or equal to 96. 1: At least one of the error counters is greater than 96 and reached the warning level.
CAN error counter register (CEC)
CAN Error Counter Register Low CECL (032EH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 REC7 0
6 REC6 0
5 REC5 0
4 REC4 R/W 0
3 REC3 0
2 REC2 0
1 REC1 0
0 REC0 0
CAN Error Counter Register High CECH (032FH)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
15 TEC7 0
14 TEC6 0
13 TEC5 0
12 TEC4 R/W 0
11 TEC3 0
10 TEC2 0
9 TEC1 0
8 TEC0 0
The CAN controller contains two error counters: receive error counter REC and transmit error counter TEC. The values of both counters can be read by the CPU. A write access to the error counters is only in the test error mode possible at the same time with the same value of lower 8bit. ( bit in MCR register is set). These error counters are incremented or decremented according to the CAN version 2.0B.
A controller takes the following three states according to the value of REC and TEC. (1) Error active state (TEC < 128 and REC < 128) The state where the error has hardly occurred CAN controller is in an error active state after reset release. When an error is detected, an active error flag is transmitted. (2) Error passive state (TEC >= 128 or REC >=128) The state where many errors have occurred When an error is detected, a passive error flag is transmitted. (3) Bus off state (TEC >=256) CAN controller cannot perform the message transmission and reception to CAN bus.
Receive error counter REC is not incremented after exceeding the error passive limit (128). After the correct reception of a message when REC = 128, the counter is set to a value between 119 and 127. After reaching the bus off status, the counts are undefined.
92CD54I-241
2006-01-27
TMP92CD54I
CAN controller which changed to the bus off state will be in an error active state automatically, if the 11 continuous recessive bits on the CAN bus is detected 128 times. All internal flags are reset, and the error counters are cleared. The configuration registers keep the programmed values. The values of the error
counters are undefined during bus off status. When CAN controller enters configuration mode (see 3.12.4(1) Configuration mode) the error counters will be cleared to 0.
(7) Interrupt control registers The CAN controller has the following interrupt sources: Transmit interrupt When a message has been transmitted successfully Receive interrupt When a message has been received successfully Remote frame pending interrupt When a remote frame is received Wake-up interrupt When the CAN controller is awakened from sleep mode Receive message lost interrupt When a receive message is lost Transmission abort interrupt When at least one of the bits in the AA register is set to 1 Time stamp counter overflow interrupt When the time stamp counter has overflowed Bus off interrupt When the CAN controller enters the bus off mode Error passive interrupt When the CAN controller enters the error passive mode Warning level interrupt When at least one of the two error counters is greater than 96 and reached the warning level These interrupt sources are divided in three groups: Transmit interrupt (INTCT) Receive interrupt (INTCR) Global interrupt (INTCG) There is one interrupt output line for each group. INTCR is dedicated for receive interrupts, INTCT is dedicated for transmit interrupts and INTCG for the global interrupts.
92CD54I-242
2006-01-27
TMP92CD54I
Global interrupt flag register (GIF)
Global Interrupt Flag Register Low GIFL (0320H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 RFPF 0
6 WUIF 0
5 RMLIF 0
4 3 TRMABF TSOIF R/C 0 0
2 BOIF 0
1 EPIF 0
0 WLIF 0
Global Interrupt Flag Register High GIFH (0321H)
Read modify-write instructions prohibited.
15 bit Symbol Read/Write After reset
14
13
12
11
10
9
8
The interrupt flag bits will be set to 1 if the corresponding interrupt condition has occurred. If the corresponding interrupt mask bit is set to 1 in the GIM register, an interrupt pulse on the global interrupt line INTCG will be generated. As long as an interrupt flag in the GIF register is set to 1, if the corresponding interrupt source generates a new interrupt event, a new interrupt pulse on INTCG will not be generated. If an interrupt flag in the GIF register is set and another interrupt source generates an interrupt event, then a new interrupt pulse on INTCG will be generated. If one or more interrupt flags have been cleared to 0 and one or more interrupt flags are still set to 1, a new global interrupt pulse INTCG will be generated. The interrupt flags will be cleared to 0 by writing a "1" to the corresponding bit location. RFPF: Remote Frame Pending Flag 0: No remote frame has been received. 1: A remote frame has been received (in a receive-mailbox). This bit will not be set if the identifier of the remote frame matches to a transmit-mailbox with set to 1. WUIF: Wake-Up Interrupt Flag 0: The CAN controller is in the sleep mode or the normal operation mode. 1: The CAN controller has left the sleep mode. RMLIF: Receive Message Lost Interrupt Flag 0: No receive message has been lost. 1: At least one of the receive-mailboxes, receive message lost has been occurred. At least one of the bits in the RML register is set to 1. TRMABF: Transmission Abort Flag 0: No transmission has been aborted. 1: Transmission has been aborted. At least one of the bits in the AA register is set to 1. TSOIF: Time Stamp Counter Overflow Interrupt Flag 0: There was no overflows of the time stamp counter since this bit has been cleared. 1: There was at least one overflow of the time stamp counter since this bit has been cleared.
92CD54I-243
2006-01-27
TMP92CD54I
BOIF: Bus Off Interrupt Flag 0: The CAN controller is still in the bus on mode. 1: The CAN controller has entered the bus off mode. EPIF: Error Passive Interrupt Flag 0: The CAN controller is still in error active mode. 1: The CAN controller has entered the error passive mode. WLIF: Warning Level Interrupt Flag 0: none of the error counters has reached the warning level. 1: At least one of the error counters has reached the warning level. Global interrupt mask register (GIM)
Global Interrupt Mask Register Low GIML (0322H) bit Symbol Read/Write After reset 7 RFPM 0 6 WUIM 0 5 RMLIM 0 4 3 TRMABM TSOIM R/W 0 0 2 BOIM 0 1 EPIM 0 0 WLIM 0
Global Interrupt Mask Register High GIMH (0323H) 15 bit Symbol Read/Write After reset 14 13 12 11 10 9 8
Each interrupt flag bits in GIF register is masked by the corresponding mask bit in GIM register. If a bit in GIM register is 0, the interrupt generation for the corresponding global interrupt event is disabled and if it is 1, the interrupt generation is enabled. After reset, all bits in GIM register are cleared to 0, there by disabling global interrupt.
92CD54I-244
2006-01-27
TMP92CD54I
Mailbox interrupts Separare interrupt outputs are provided for mailbox interrupts independently of global interrupts. These include mailbox transmit interrupt INTCT and mailbox receive interrupt INTCR that depend on mailbox settings. A mailbox transmit interrupt flag register MBTIF is provided for mailbox transmit interrupts, and a mailbox receive interrupt flag register MBRIF is provided for mailbox receive interrupts. In addition, there is a mailbox interrupt mask register MBIM that enables or disables each mailbox interrupt. Mailbox interrupt mask register (MBIM)
Mailbox Interrupt Mask Register Low MBIML (0328H) bit Symbol Read/Write After reset 7 MBIM7 0 6 MBIM6 0 5 MBIM5 0 4 3 MBIM4 MBIM3 R/W 0 0 2 MBIM2 0 1 MBIM1 0 0 MBIM0 0
Mailbox Interrupt Mask Register High MBIMH (0329H) bit Symbol Read/Write After reset 15 MBIM15 0 14 MBIM14 0 13 MBIM13 0 12 11 MBIM12 MBIM11 R/W 0 0 10 MBIM10 0 9 MBIM9 0 8 MBIM8 0
Each bit corresponds to mailboxes 0 through 15. The MBIM register settings determine to enable or disable each mailbox interrupt. If a bit in MBIM register is "0", the interrupt generation for the corresponding mailbox is disabled. If a bit in MBIM register is "1", the interrupt generation for the corresponding mailbox is enabled.
92CD54I-245
2006-01-27
TMP92CD54I
Mailbox transmit interrupt flag register (MBTIF)
Mailbox Transmit Interrupt Flag Register Low MBTIFL (0324H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 MBTIF7 0
6 MBTIF6 0
5 MBTIF5 0
4 3 MBTIF4 MBTIF3 R/C 0 0
2 MBTIF2 0
1 MBTIF1 0
0 MBTIF0 0
Mailbox Transmit Interrupt Flag Register High MBTIFH (0325H)
Read modify-write instructions prohibited.
15 bit Symbol Read/Write After reset
14 13 12 11 10 MBTIF14 MBTIF13 MBTIF12 MBTIF11 MBTIF10 R/C 0 0 0 0 0
9 MBTIF9 0
8 MBTIF8 0
This register is provided for mailbox transmit interrupts. Each bit in this register corresponds to mailboxes 0 through 15. The interrupt flag for mailbox 15, the flag, is nonexistent because mailbox 15 is the receive-only mailbox. If mailbox "n" is directed for receive, the corresponding interrupt flag in this register, the flag, will always be read as "0". If a message in mailbox "n" has been transmitted successfully and the mask bit is set to "1", the corresponding transmit interrupt flag will be set. If no other bit was set before in MBTIF register, transmit interrupt pulse INTCT will be generated. If for a mailbox the mask bit in MBIM register is "0", the transmit interrupt flag in MBTIF register will not be set and no transmit interrupt pulse INTCT will be generated. The information about a successful transmission could be read from the TA register respectively. If one or more transmit interrupt flags have been set in MBTIF register and another interrupt condition has been occurred no interrupt will be generated, but the corresponding flag in MBTIF register will be set. If there is one or more transmit interrupt flags set after clearing one or more transmit interrupt flags, another mailbox transmit interrupt pulse INTCT will be generated. The interrupt flags in MBTIF register will be cleared by writing a "1" from the CPU to MBTIF register. Writing a "0" has no effect. Note that the interrupt flags in MBTIF register is checked to be 1 (active), before doing a clear-access.
92CD54I-246
2006-01-27
TMP92CD54I
Mailbox receive interrupt flag register (MBRIF)
Mailbox Receive Interrupt Flag Register Low MBRIFL (0326H)
Read modify-write instructions prohibited.
bit Symbol Read/Write After reset
7 MBRIF7 0
6 MBRIF6 0
5 MBRIF5 0
4 3 MBRIF4 MBRIF3 R/C 0 0
2 MBRIF2 0
1 MBRIF1 0
0 MBRIF0 0
Mailbox Receive Interrupt Flag Register High MBRIFH (0327H)
Read modify-write instructions prohibited.
15 14 13 12 11 10 bit Symbol MBRIF15 MBRIF14 MBRIF13 MBRIF12 MBRIF11 MBRIF10 Read/Write R/C After reset 0 0 0 0 0 0
9 MBRIF9 0
8 MBRIF8 0
This register is provided for mailbox receive interrupts. Each bit in this register corresponds to mailboxes 0 through 15. If mailbox "n" is directed for transmit, the corresponding interrupt flag in this register, the flag, will always be read as "0". If a message in mailbox "n" has been received successfully and the mask bit is set to "1", the corresponding receive interrupt flag will be set. If no other bit was set before in MBRIF register, receive interrupt pulse INTCR will be generated. If for a mailbox the mask bit in MBIM register is 0, the receive interrupt flag in MBRIF register will not be set and no receive interrupt pulse INTCR will be generated. The information about a successful reception could be read from the RMP register respectively. If one or more receive interrupt flags have been set in MBRIF register and another interrupt condition has been occurred no interrupt will be generated, but the corresponding flag in MBRIF register will be set. If there is one or more receive interrupt flags set after clearing one or more receive interrupt flags, another mailbox receive interrupt pulse INTCR will be generated. The interrupt flags in MBRIF register will be cleared by writing a "1" from the CPU to MBRIF register. Writing a "0" has no effect. Note that the interrupt flags in MBRIF register is checked to be 1 (active), before doing a clear-access.
92CD54I-247
2006-01-27
TMP92CD54I 3.12.4 Description of Mode
(1) Configuration mode The CAN controller has to be initialized (set the bit configuration registers BCR1 and BDR2) before the activation. The BCR1 and BCR2 registers can only be modified when the module is in the configuration mode. After reset, the configuration mode is active and the bit of MCR register and the bit of GSR register are set to "1". The CAN controller can be set to the normal operation mode by writing a "0" to bit. After leaving the configuration mode, the bit will be set to "0" and the power-up sequence will start. The power-up sequence consists of detecting eleven consecutive recessive bits on the CAN bus line. After the power-up sequence, the CAN controller is bus on and ready for operation. When the bit is set to "1", the CAN controller will be entered to the configuration mode from the normal operation mode. After the CAN controller has entered the configuration mode, the bit will be set to "1". See also the flowchart in Figure 3.12.5 Flowchart of CAN Initialization. When at the configuration mode, the error counter CEC, the time stamp counter TSC and the time stamp hold register will be cleared.
Reset Switch to configuration mode from normal operation mode
Configuration mode = 1, = 1
Normal operation mode = 0, = 0
Set bit timing parameters in BCR1 & BCR2
Configuration mode requested? no yes Set to 1
no
Normal operation mode requested? yes Set to 0
= 1? yes
no
= 0? yes Normal operation mode = 0, = 0 Starts power-up sequence
no
11 consecutive recessive bits detected? yes Bus on
no
Figure 3.12.5
Flowchart of CAN Initialization
92CD54I-248
2006-01-27
TMP92CD54I
(2) Sleep mode The sleep mode will be requested by writing 1 to the bit of the MCR register. When the CAN controller enters the sleep mode, the status bit of the GSR register will be set to 1. During the sleep mode the clock of the CAN controller is switched off. Only the wake up logic will be active. The read value of the GSR register will be F040H, this means, there is no message in transmit buffer and the sleep mode is active ( bit is set to 1). Read accesses to all other registers will deliver the value 0000H. Write accesses to all registers but the MCR register will be denied. The CAN controller leaves the sleep mode if a write access to the MCR register has been detected or there is any bus activity detected on the CAN bus line (with = 1), the CAN controller begins its power up sequence. The CAN controller waits until detecting 11 consecutive recessive bits on the RX input line and goes to bus active after them. The first message that initiates the bus activity can not be received. In sleep mode the CAN error counters and all `transmission request set bits ' and `transmission request reset bits will be cleared to 0. After leaving the sleep mode, bit in the MCR register and bit in the GSR register will be cleared to 0. If the CAN controller is transmitting a message when the bit is set to 1, the CAN controller will not switch to the sleep mode immediately. It will continue until a successful transmission or after losing the arbitration, until a successful reception or until an error condition occurs on the CAN bus line. By this means the CAN controller will initiates no error condition on the CAN bus line. (3) Halt mode The halt mode will be requested by writing 1 to the bit of the MCR register. When the CAN controller enters the halt mode, the bit of the GSR register will be set. During the halt mode the CAN controller does not send or receive any messages. The CAN controller is still active on the CAN bus line. Error Flags and Acknowledge Flags will be sent. The CAN controller leaves the halt mode if the bit is reset to 0. If the CAN controller is transmitting a message when the bit is set, the transmission will be continued until a successful transmission or detect a lost arbitration. So the CAN controller initiates no error condition on the CAN bus line. (4) Test loop back mode In this mode, the CAN controller can receive its own transmitted message and will generate its own acknowledge bit. No other CAN controller is necessary for the operation. The only supposition is that the RX and TX lines must be connected to a CAN bus transceiver or directly together. In the test loop back mode, the CAN controller can transmit a message from one mailbox and receive it in another mailbox. The set-up for the mailboxes is the same as in the normal operation mode. The test loop back mode shall only be enabled or disabled in the configuration mode. Figure 3.12(6) shows the flowchart of the test loop back mode / the test error mode set-up.
92CD54I-249
2006-01-27
TMP92CD54I
(5) Test error mode The error counters can only be written when the CAN controller is in the test error mode. When the CAN controller is in the test error mode, both error counters will be written at the same time with the same value (lower 8 bit). The maximum value that can be written into the error counters is 255. Thus, the error counter value of 256 which forces the CAN controller into the bus off mode can not be written into the error counters. The test error mode shall only be enabled or disabled in the configuration mode. Figure 3.12(6) shows the flowchart of the test loop back mode / the test error mode set-up.
Enable / disable test loop back mode / test error mode Normal operation mode = 0, = 0 Configuration mode request Set to 1
= 1? yes Set-up / 0: disable 1: enable Normal operation mode request Set to 0
No
= 0? yes End of set-up Normal operation mode
No
Figure 3.12.6 Flowchart of the test loop back mode / the test error mode set-up
92CD54I-250
2006-01-27
TMP92CD54I 3.12.5 Functional description
(1) Transmit mode Figure 3.12.7 shows one example of the flowchart of message transmit by using the transmit interrupt INTCT. It is also possible to use polling instead of interrupt. In this case, "Transmit interrupt generated?" is replaced by " = 1?". "Set to 1" and "Clear " must be removed from the flow.
Set-up message transmission yes Set to 0 no Set to 0 Setup ID, to mailbox "n" Setup Transmission request? Set to 1 Set to 1 End of setup Transmit interrupt generated? yes Check Special user tasks (update mailbox data) Clear , RETI yes Set to 1 no Update mailbox data? yes Write new data no New setup? no Transmitting message
Figure 3.12.7 Flowchart of message transmission (Example)
92CD54I-251
2006-01-27
TMP92CD54I
(2) Receive mode If the CAN controller has received a message from the CAN bus line, this message will be located in the receive buffer. The message stored in the received buffer will be compared to the identifier of mailbox. If / bit is set, the global/local acceptance mask register GAM/LAM will be used. If there is one of the following conditions found, no further compare will be done. Data fame and a matching identifier in a mailbox configured as receive Remote frame and a matching identifier in a mailbox configured as receive Remote frame and a matching identifier in a mailbox configured as transmit and bit is set The minimum time to save a next received message after the bit set depends on the configured bit timing. In case of the data length code = 0, the minimal time is as follows. Standard format: 47 bit times - 16 fIO Extended format: 67 bit times - 16 fIO
92CD54I-252
2006-01-27
TMP92CD54I
Data frames Figure 3.12.8 shows one example of the flowchart of message reception by using the reception interrupt INTCR. It is also possible to use polling instead of the interrupt. In this case, "Receive interrupt generated?" is replaced by " = 1?". "Set to 1" and "Clear " must be removed from the flow.
Setup for message Reception Yes New setup? Set to 0 No Receive interrupt generated? Yes Check and No Receiving message
Set to 1
Setup ID, to mailbox "n"
Note1
If necessary, Set / Setup LAM/GAM
Read out the mailbox n Yes = 1? No
Set to 1
Message lost
(The data that was read out the mailbox n was invalid.)
Note2
Clear
Set to 1 Clear Clear End of setup
Note2 Note2
Clear
RETI
Note1: Be sure to check and . Note2: If "Clear " is executed and then the mailbox n receives the message before "Clear ", will be set 1 (=0) depending on the situation. Figure 3.12.8 Flowchart of message reception (Example)
92CD54I-253
2006-01-27
TMP92CD54I
Remote frame Figure 3.12.9 shows one example of the flowchart the handling of remote frame by using the automatic reply feature. This feature is available when the bit of a mailbox, which is configured for transmission is set. To avoid data inconsistency problems when updating the mailbox data the CDR register is used.
Setup a mailbox for automatic reply to remote frame yes Set to 0 New setup? no no Set to 0 Update mailbox data? yes Change data requested: set to 1 Automatic reply to remote frames
Setup ID, Set to 1 to mailbox "n"
If necessary, Set Setup GAM
Write new data to the mailbox
End of change data: set to 0 Setup
Set to 1
End of setup
Figure 3.12.9 Flowchart of remote frame handling with the automatic reply feature (Example)
92CD54I-254
2006-01-27
TMP92CD54I
3.13 Analog/Digital Converter
TMP92CD54I incorporates a 10-bit successive approximation-type analog/digital converter (AD converter) with 12-channel analog input. Figure 3.13.1 is a block diagram of the AD converter. The 12-channel analog input pins (AN0 to AN11) are shared with the input-only port Port G and Port L, so they can be used as an input port. Note: When IDLE1, IDLE2, IDLE3 or STOP Mode is selected, as to reduce the power, with some timings the system may enter a standby mode even though the internal comparator is still enabled. Therefore be sure to check that AD converter operations are halted before a HALT instruction is executed.
Internal data bus
AD mode control register 1
ADMOD1
AD mode control register 0 ADMOD0

Decoder
Scan Repeat Interrupt Busy End
Analog input
Start AD Converter Control Circuit
AN11 (PL3) AN10 (PL2) AN9 (PL1) AN8 (PL0) Multiplexer AN7 (PG7) AN6 (PG6) AN5 (PG5) AN4 (PG4) AN3 (PG3) AN2 (PG2) AN1 (PG1) AN0 (PG0)
Channel select
INTAD interrupt
Sample and Hold
R C
AD Conversion Result + - Comparator Register ADREG0L to ADREGBL ADREG0H to ADREGBH
VREFH VREFL
DA converter
Note: R: internal resistance = 7k ohm (reference data) C: internal capacitance = 10pF+4pF (reference data)
Figure 3.13.1 Block diagram of AD converter
92CD54I-255
2006-01-27
TMP92CD54I 3.13.1 Analog/Digital converter registers
The AD converter is controlled by the two AD Mode Control Registers: ADMOD0 and ADMOD1. The twelve AD Conversion Data Result Registers (ADREG0H/L, ADREGBH/L) store the results of AD conversion. Figure 3.13.2 shows the registers related to the AD converter.
AD Mode Control Register 0
7
ADMOD0 (0138H) Bit symbol Read/Write After Reset 0
AD Conversion End flag 0: conversion in progress 1: conversion complete
6
ADBF R 0
AD Conversion Busy flag 0: conversion stopped 1: Conversion in progress
5
- 0
Note: Always fixed to 0
4
- 0
Note: Always fixed to 0
3
ITM0 0
Interrupt specification in conversion channel fixed repeat mode 0: every conversion 1: every fourth conversion
2
REPEAT R/W 0
Repeat mode specification 0: Single Conversion 1: Repeat Conversion Mode
1
SCAN 0
Scan mode specification 0: Conversion Channel Fixed Mode 1: Conversion Channel Scan Mode
0
ADS 0
AD conversion start 0: Don't care 1: start conversion Always 0 when read
EOCF
Function
AD conversion start 0 1 Don't care Start AD conversion
Note: Always read as 0. AD scan mode setting 0 1 AD Conversion Channel Fixed Mode AD Conversion Channel Scan Mode
AD repeat mode setting 0 1 AD Single Conversion Mode AD Repeat Conversion Mode
Specify AD conversion interrupt for Channel Fixed Repeat Conversion Mode Channel Fixed Repeat Conversion Mode = "0", = "1" 0 1 Generates interrupt every conversion. Generates interrupt every fourth conversion.
AD Conversion Busy flag 0 1 AD conversion stopped AD conversion in progress
AD Conversion End flag 0 1 Before or during AD conversion AD conversion complete
Figure 3.13.2 AD Converter Related Register
92CD54I-256
2006-01-27
TMP92CD54I
AD Mode Control Register 1
7
ADMOD1 (0139H) Bit symbol Read/Write After Reset Function VREFON R/W 0
VREF application control 0: OFF 1: ON
6
I2AD R/W 0
IDLE2 0: Stop 1: Operate
5
0
Note: Always fixed to 0
4
0
Note: Always fixed to 0
3
ADCH3 0
2
ADCH2 R/W 0
1
ADCH1 0
0
ADCH0 0
Analog input channel selection
Analog input channel selection 0000 0001 0010 0011 0100 0101 0110 0111 1000 0 channel fixed AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN0 AN0 AN1 AN0 AN1 AN2 AN0 AN1 AN2 AN3 AN0 AN1 AN2 AN3 AN4 AN0 AN1 AN2 AN3 AN4 AN5 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 1 channel scanned
1001
AN9
1010
AN10
1011
AN11
IDLE2 control 0 1 Stopped In operation
Control of application of reference voltage to AD converter 0 1 OFF ON
Before starting conversion (before writing 1 to ADMOD0 ), set the bit to 1.
Figure 3.13.3 AD Converter Related Register
92CD54I-257
2006-01-27
TMP92CD54I
AD Conversion Result Register 0 Low
7
ADREG0L (0120H) Bit symbol Read/Write After Reset Function ADR01 R Undefined
6
ADR00
5
4
3
2
1
0
ADR0RF R
-
-
-
-
-
0
AD Conversion Data Storage flag 1: Conversion result stored
Stores lower 2 bits of AD conversion result
AD Conversion Result Register 0 High
7
ADREG0H (0121H) Bit symbol Read/Write After Reset Function ADR09
6
ADR08
5
ADR07
4
ADR06 R Undefined
3
ADR05
2
ADR04
1
ADR03
0
ADR02
Stores upper eight bits AD conversion result. AD Conversion Result Register 1 Low
7
ADREG1L (0122H) Bit symbol Read/Write After Reset Function ADR11 R Undefined
6
ADR10
5
4
3
2
1
0
ADR1RF R
-
-
-
-
-
0
AD Conversion Result flag 1: Conversion result stored
stores lower 2 bits of AD conversion result
AD Conversion Result Register 1 High
7
ADREG1H (0123H) Bit symbol Read/Write After Reset Function 9 Channel x conversion result ADR19
6
ADR18
5
ADR17
4
ADR16 R Undefined
3
ADR15
2
ADR14
1
ADR13
0
ADR12
Stores upper eight bits of AD conversion result. 8 7 6 5 4 3 2 1 0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* Bits 5 to 1 are always read as 1. * Bit 0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.13.4 AD Converter Related Registers
92CD54I-258
2006-01-27
TMP92CD54I
AD Conversion Result Register 2 Low
7
ADREG2L (0124H) Bit symbol Read/Write After Reset ADR21 R Undefined
6
ADR20
5
4
3
2
1
0
ADR2RF R
-
-
-
-
-
0
A/D conversion data storage flag 1: Conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 2 High
7
ADREG2H (0125H) Bit symbol Read/Write After Reset Function ADR29
6
ADR28
5
ADR27
4
ADR26 R Undefined
3
ADR25
2
ADR24
1
ADR23
0
ADR22
Stores upper eight bits of AD conversion result. AD Conversion Result Register 3 Low
7
ADREG3L (0126H) Bit symbol Read/Write After Reset ADR31 R Undefined
6
ADR30
5
4
3
2
1
0
ADR3RF R
-
-
-
-
-
0
AD Conversion Data Storage flag 1: conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 3 High
7
ADREG3H (0127H) Bit symbol Read/Write After Reset Function 9 Channel x conversion result ADR39
6
ADR38
5
ADR37
4
ADR36 R Undefined
3
ADR35
2
ADR34
1
ADR33
0
ADR32
Stores upper eight bits of AD conversion result. 8 7 6 5 4 3 2 1 0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* Bits 5 to 1 are always read as 1. * Bit 0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.13.5 AD Converter Related Registers
92CD54I-259
2006-01-27
TMP92CD54I
AD Conversion Result Register 4 Low
7
ADREG4L (0128H) Bit symbol Read/Write After Reset ADR41 R Undefined
6
ADR40
5
4
3
2
1
0
ADR4RF R
-
-
-
-
-
0
A/D conversion data storage flag 1: Conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 4 High
7
ADREG4H (0129H) Bit symbol Read/Write After Reset Function ADR49
6
ADR48
5
ADR47
4
ADR46 R Undefined
3
ADR45
2
ADR44
1
ADR43
0
ADR42
Stores upper eight bits of AD conversion result. AD Conversion Result Register 5 Low
7
ADREG5L (012AH) Bit symbol Read/Write After Reset ADR51 R Undefined
6
ADR50
5
4
3
2
1
0
ADR5RF R
-
-
-
-
-
0
AD Conversion Data Storage flag 1: conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 5 High
7
ADREG5H (012BH) Bit symbol Read/Write After Reset Function 9 Channel x conversion result ADR59
6
ADR58
5
ADR57
4
ADR56 R Undefined
3
ADR55
2
ADR54
1
ADR53
0
ADR52
Stores upper eight bits of AD conversion result. 8 7 6 5 4 3 2 1 0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* Bits 5 to1 are always read as 1. * Bit 0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.13.6 AD Converter Related Registers
92CD54I-260
2006-01-27
TMP92CD54I
AD Conversion Result Register 6 Low
7
ADREG6L (012CH) Bit symbol Read/Write After Reset ADR61 R Undefined
6
ADR60
5
4
3
2
1
0
ADR6RF R
-
-
-
-
-
0
A/D conversion data storage flag 1: Conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 6 High
7
ADREG6H (012DH) Bit symbol Read/Write After Reset Function ADR69
6
ADR68
5
ADR67
4
ADR66 R Undefined
3
ADR65
2
ADR64
1
ADR63
0
ADR62
Stores upper eight bits of AD conversion result. AD Conversion Result Register 7 Low
7
ADREG7L (012EH) Bit symbol Read/Write After Reset ADR71 R Undefined
6
ADR70
5
4
3
2
1
0
ADR7RF R
-
-
-
-
-
0
AD Conversion Data Storage flag 1: conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 7 High
7
ADREG7H (012FH) Bit symbol Read/Write After Reset Function 9 Channel x conversion result ADR79
6
ADR78
5
ADR77
4
ADR76 R Undefined
3
ADR75
2
ADR74
1
ADR73
0
ADR72
Stores upper eight bits of AD conversion result. 8 7 6 5 4 3 2 1 0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* Bits 5 to 1 are always read as 1. * Bit 0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.13.7 AD Converter Related Registers
92CD54I-261
2006-01-27
TMP92CD54I
AD Conversion Result Register 8 Low
7
ADREG8L (0130H) Bit symbol Read/Write After Reset ADR81 R Undefined
6
ADR80
5
4
3
2
1
0
ADR8RF R
-
-
-
-
-
0
A/D conversion data storage flag 1: Conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 8 High
7
ADREG8H (0131H) Bit symbol Read/Write After Reset Function ADR89
6
ADR88
5
ADR87
4
ADR86 R Undefined
3
ADR85
2
ADR84
1
ADR83
0
ADR82
Stores upper eight bits of AD conversion result. AD Conversion Data Register 9 Low
7
ADREG9L (0132H) Bit symbol Read/Write After Reset ADR91 R Undefined
6
ADR90
5
4
3
2
1
0
ADR9RF R
-
-
-
-
-
0
AD Conversion Data Storage flag 1: conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register 9 High
7
ADREG9H (0133H) Bit symbol Read/Write After Reset Function 9 Channel x conversion result ADR99
6
ADR98
5
ADR97
4
ADR96 R Undefined
3
ADR95
2
ADR94
1
ADR93
0
ADR92
Stores upper eight bits of AD conversion result. 8 7 6 5 4 3 2 1 0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* Bits 5 to 1 are always read as 1. * Bit 0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.13.8 AD Converter Related Registers
92CD54I-262
2006-01-27
TMP92CD54I
AD Conversion Result Register A Low
7
ADREGAL (0134H) Bit symbol Read/Write After Reset ADRA1 R Undefined
6
ADRA0
5
4
3
2
1
0
ADRARF R
-
-
-
-
-
0
A/D conversion data storage flag 1: Conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register A High
7
ADREGAH (0135H) Bit symbol Read/Write After Reset Function ADRA9
6
ADRA8
5
ADRA7
4
ADRA6 R Undefined
3
ADRA5
2
ADRA4
1
ADRA3
0
ADRA2
Stores upper eight bits of AD conversion result. AD Conversion Result Register B Low
7
ADREGBL (0136H) Bit symbol Read/Write After Reset ADRB1 R Undefined
6
ADRB0
5
4
3
2
1
0
ADRBRF R
-
-
-
-
-
0
AD Conversion Data Storage flag 1: conversion result stored
Stores lower 2 bits of AD conversion result. Function
AD Conversion Result Register B High
7
ADREGBH (0137H) Bit symbol Read/Write After Reset Function 9 Channel x conversion result ADRB9
6
ADRB8
5
ADRB7
4
ADRB6 R Undefined
3
ADRB5
2
ADRB4
1
ADRB3
0
ADRB2
Stores upper eight bits of AD conversion result. 8 7 6 5 4 3 2 1 0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* Bits 5 to 1 are always read as 1. * Bit 0 is the AD conversion data storage flag . When the AD conversion result is stored, the flag is set to 1. When either of the registers (ADREGxH, ADREGxL) is read, the flag is cleared to 0.
Figure 3.13.9 AD Converter Related Registers
92CD54I-263
2006-01-27
TMP92CD54I 3.13.2 Description of operation
(1) Analog reference voltage A high-level analog reference voltage is applied to the VREFH pin; a low-level analog reference voltage is applied to the VREFL pin. To perform AD conversion, the reference voltage, the difference between VREFH and VREFL, is divided by 1024 using string resistance. The result of the division is then compared with the analog input voltage. To turn off the switch between VREFH and VREFL, write a 0 to ADMOD1 in AD Mode Control Register 1. To start AD conversion in the OFF state, first write a 1 to ADMOD1, wait 3 s until the internal reference voltage stabilizes (this is not related to fc), then set ADMOD0 to 1. (2) Analog input channel selection The analog input channel selection varies depends on the operation mode of the AD converter. * In Analog Input Channel Fixed Mode (ADMOD0 = 0) Setting ADMOD1 selects one of the input pins AN0~AN11 as the input channel. * In Analog Input Channel Scan Mode (ADMOD0 = 1) Setting ADMOD1 selects one of the twelve scan modes. Table 3.13.1 illustrates analog input channel selection in each operation mode. On a Reset, ADMOD0 is set to 0 and ADMOD1 is initialized to 0000. Thus pin AN0 is selected as the fixed input channel. Pins not used as analog input channels can be used as standard input port pins.
Table 3.13.1 Analog input channel selection
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 Channel fixed = "0" AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 AN0 AN0 AN1 AN0 AN1 AN2 AN0 AN1 AN2 AN3 AN0 AN1 AN2 AN3 AN4 AN0 AN1 AN2 AN3 AN4 AN5 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 Channel scan = "1"
92CD54I-264
2006-01-27
TMP92CD54I
(3) Starting AD Conversion To start AD conversion, write a 1 to ADMOD0 in AD Mode Control Register 0 .When AD conversion starts, the AD Conversion Busy flag ADMOD0 will be set to 1, indicating that AD conversion is in progress. (4) AD conversion modes and the AD Conversion End interrupt The four AD conversion modes are: * Channel Fixed Single Conversion Mode * Channel Scan Single Conversion Mode * Channel Fixed Repeat Conversion Mode * Channel Scan Repeat Conversion Mode The ADMOD0 and ADMOD0 settings in AD Mode Control Register 0 determine the AD mode setting. Completion of AD conversion triggers an INTAD AD Conversion End interrupt request. Also, ADMOD0 will be set to 1 to indicate that AD conversion has been completed. Channel Fixed Single Conversion Mode Setting ADMOD0 and ADMOD0 to 00 selects Conversion Channel Fixed Single Conversion Mode. In this mode data on one specified channel is converted once only. When the conversion has been completed, the ADMOD0 flag is set to 1, ADMOD0 is cleared to 0, and an INTAD interrupt request is generated. Channel Scan Single Conversion Mode Setting ADMOD0 and ADMOD0 to 01 selects Conversion Channel Scan Single Conversion Mode. In this mode data on the specified scan channels is converted once only. When scan conversion has been completed, ADMOD0 is set to 1, ADMOD0 is cleared to 0, and an INTAD interrupt request is generated. Channel Fixed Repeat Conversion Mode Setting ADMOD0 and ADMOD0 to 10 selects Conversion Channel Fixed Repeat Conversion Mode. In this mode data on one specified channel is converted repeatedly. When conversion has been completed, ADMOD0 is set to 1 and ADMOD0 is not cleared to 0 but held at 1. INTAD interrupt request generation timing is determined by the setting of ADMOD0. Setting to 0 generates an interrupt request every time an AD conversion is completed. Setting to 1 generates an interrupt request on completion of every fourth conversion.
92CD54I-265
2006-01-27
TMP92CD54I
Channel Scan Repeat Conversion Mode Setting ADMOD0 and ADMOD0 to 11 selects Conversion Channel Scan Repeat Conversion Mode. In this mode data on the specified scan channels is converted repeatedly. When each scan conversion has been completed, ADMOD0 is set to 1 and an INTAD interrupt request is generated. ADMOD0 is not cleared to 0 but held at 1. To stop conversion in a repeat conversion mode (i.e. in cases and ), write a 0 to ADMOD0. After the current conversion has been completed, the repeat conversion mode terminates and ADMOD0 is cleared to 0. Switching to a halt state (IDLE2 Mode with ADMOD1 cleared to 0, IDLE1 Mode or STOP Mode) immediately stops operation of the AD converter even when AD conversion is still in progress. In repeat conversion modes (i.e. in cases and ), when the halt is released, conversion restarts from the beginning. In single conversion modes (i.e. in cases and ), conversion does not restart when the halt is released (the converter remains stopped). Table 3.13.2 shows the relationship between the AD conversion modes and interrupt requests.
Table 3.13.2 Relationship Between AD Conversion Modes and Interrupt Requests Mode
Channel Fixed Single Conversion Mode Channel Scan Single Conversion Mode Channel Fixed Repeat Conversion Mode Channel Scan Repeat Conversion Mode
Interrupt Request Generation
After completion of conversion After completion of scan conversion Every conversion Every forth conversion After completion of every scan conversion
ADMOD0
X X 0 1 X

0 0 1 1

0 1 0 1
X: Don't care
92CD54I-266
2006-01-27
TMP92CD54I
(5) AD conversion time 160/fc (8 s @ fc = 20 MHz) are required for the AD conversion of one channel. (6) Storing and reading the results of AD conversion The AD Conversion Data Upper and Lower Registers (ADREG0H/L to ADREGBH/L) store the results of AD conversion. (ADREG0H/L to ADREGBH/L are read-only registers.) In Channel Fixed Repeat Conversion Mode, the conversion results are stored successively in registers ADREG0H/L to ADREG3H/L. In other modes the AN0, AN1, AN2, AN3, AN4, AN5, AN6, AN7 conversion results are stored in ADREG0H/L, ADREG1H/L, ADREG2H/L, ADREG3H/L, ADREG4H/L, ADREG5H/L, ADREG6H/L, ADREG7H/L, ADREG8H/L, ADREG9H/L, ADREGAH/L, ADREGBH/L respectively. Table 3.13.3 shows the correspondence between the analog input channels and the registers which are used to hold the results of AD conversion.
Table 3.13.3 Correspondence Between Analog Input Channels and AD Conversion Result Registers AD Conversion Result Register Analog input channel (Port G/Port L)
AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11
Conversion modes other than at right
ADREG0H/L ADREG1H/L ADREG2H/L ADREG3H/L ADREG4H/L ADREG5H/L ADREG6H/L ADREG7H/L ADREG8H/L ADREG9H/L ADREGAH/L ADREGBH/L
Channel fixed repeat conversion mode (every 4 th conversion)
ADREG0H/L ADREG1H/L ADREG2H/L ADREG3H/L
, bit 0 of the AD conversion data lower register, is used as the AD conversion data storage flag. The storage flag indicates whether the AD conversion result register has been read or not. When a conversion result is stored in the AD conversion result register, the flag is set to 1. When either of the AD conversion result registers (ADREGxH or ADREGxL) is read, the flag is cleared to 0. Reading the AD conversion result also clears the AD Conversion End flag ADMOD0 to 0.
92CD54I-267
2006-01-27
TMP92CD54I
Setting example: Convert the analog input voltage on the AN3 pin and write the result, to memory address 0800H using the AD interrupt (INTAD) processing routine.
Main routine: 76543210 INTE0AD ADMOD1 ADMOD0 1100---11000011 XX000001 Enable INTAD and set it to Interrupt Level 4. Set pin AN3 to be the analog input channel. Start conversion in Channel Fixed Single Conversion Mode.
Interrupt routine processing example: WA WA (0800H) ADREG3 >>6 WA Read value of ADREG3L and ADREG3H into 16-bit general-purpose register WA. Shift contents read into WA six times to right and zero-fill upper bits. Write contents of WA to memory address 0800H.
This example repeatedly converts the analog input voltages on the three pins AN0, AN1 and AN2, using Channel Scan Repeat Conversion Mode.
INTE0AD ADMOD1 ADMOD0 1000---11000010 XX000111 Disable INTAD. Set pins AN0~AN2 to be the analog input channels. Start conversion in Channel Scan Repeat Conversion Mode.
Note: X = Don't care; "-" = No change
92CD54I-268
2006-01-27
TMP92CD54I
3.14 Watchdog Timer (Runaway Detection Timer)
TMP92CD54I contains a watchdog timer of runaway detecting. The watchdog timer (WDT) is used to return the CPU to the normal state when it detects that the CPU has started to malfunction (runaway) due to causes such as noise. When the watchdog timer detects a malfunction, it generates a non-maskable interrupt INTWD to notify the CPU of the malfunction. Connecting the watchdog timer output to the reset pin internally forces a reset.
3.14.1 Configuration
Figure 3.14.1 is a block diagram of the watchdog timer (WDT).
WDMOD
RESET
Reset Control
Internal Reset
INTWD interrupt
WDMOD
16
Selector
2 /fc 2 /fc 2 /fc 2 /fc
18 20 22
(2 / fc)
Binary Counter (22 Stage) Reset
R
Q S
Internal Reset
HALT instruction executing
(STOP, IDLE3 or IDLE1 mode)
Write 4EH
Write B1H
WDMOD
WDT Control register WDCR
Internal data bus
Figure 3.14.1 Block Diagram of Watchdog Timer
92CD54I-269
2006-01-27
TMP92CD54I
The watchdog timer consists of a 22-stage binary counter which uses the clock (2/fc) as the input clock. The binary counter can output 216/fc, 218/fc, 220/fc and 222/fc. Selecting one of the outputs using WDMOD generates a watchdog timer interrupt when an overflow occurs. In the case of using watchdog timer after INTWD request generated, the clear code (4EH) should be written to the WDCR register in other to clear the binary counter.
WDT Counter
n
Over flow
0
WDT Interrupt Write clear code WDT Clear (Soft ware)
Figure 3.14.2 Normal Mode The runaway detection result can also be connected to the Reset pin internally. In this case, the reset time will be between 44x4/fc and 58x4/fc system clocks (8.8~11.6 s @ fc= 20 MHz) as shown in figure 3.14.3
Over flow WDT Counter
n
WDT Interrupt
Internal Reset 44x4/fc to 58x4/fc system clocks (8.8 to 11.6 s @ fC = 20 MHz)
Figure 3.14.3 Reset Mode
92CD54I-270
2006-01-27
TMP92CD54I 3.14.2 Control registers
The watchdog timer WDT is controlled by three control registers WDMOD, WDCR and CLKMOD. (1) Watchdog Timer Mode Register (WDMOD) i) Setting the detection time for the watchdog timer in This 2-bit register is used for setting the watchdog timer interrupt time used when detecting runaway. On a Reset this register is initialized to WDMOD = 00. The detection times for WDT is 216/fc [s]. (The number of system clocks is approximately 65,536.) ii) Watchdog timer enable/disable control register At reset, the WDMOD is initialized to 1, enabling the watchdog timer. To disable the watchdog timer, it is necessary to set this bit to 0 and to write the disable code (B1H) to the Watchdog Timer Control Register WDCR. This makes it difficult for the watchdog timer to be disabled by runaway. However, it is possible to return the watchdog timer from the disabled state to the enabled state merely by setting to 1. iii) Watchdog timer out reset connection This register is used to connect the output of the watchdog timer with the RESET terminal internally. Since WDMODis initialized to 0 at reset, a reset by the watchdog timer will not be performed. (2) Watchdog Timer Control Register (WDCR) This register is used to disable and clear the binary counter for the watchdog timer. * Disable control The watchdog timer can be disabled by clearing WDMOD to 0 and then writing the disable code (B1H) to the WDCR register.
WDMOD WDCR 0------10110001 Clear WDMOD to 0. Write the disable code (B1H).
*
Enable control Set WDMODto 1.
*
Watchdog timer clear control To clear the binary counter and cause counting to resume, write the clear code (4EH) to the WDCR register. In the case of using watchdog timer after INTWD request generated, the clear code (4EH) should be written to the WDCR register in other to clear the binary counter.
WDCR 01001110 Write the clear code (4EH).
(3) Clock Mode Register (CLKMOD) This register is used to set the warming up time after the stop mode ends. The output of CLK pin is chosen from fc and 2/5fc by the setup of CLKMOD . Moreover, CLK pin output can be stopped by writing "0" in CLKMOD . By the setup of CLKMOD , it becomes the HALT mode of IDLE1, IDLE2, IDLE3 or STOP.
92CD54I-271
2006-01-27
TMP92CD54I
7
bit symbol WDMOD (0110H) Read/Write After reset 1 WDT control 1: enable WDTE
6
WDTP1 R/W 0
5
WDTP0
4
-
3
DRVE
2
I2WDT R/W
1
RESCR
0
-
0
-
0 1: Drives pins in STOP mode
0 IDLE2 0: Stop 1: Operate
0 1: Internally connects WDT out to the reset pin
0 Always write 0
Select detecting time 16 00: 2 /fC 01: 2 /fC 10: 2 /fC 11: 2 /fC
22 20 18
Function
Watchdog timer out control 0 1 Connects WDT out to a reset
IDLE2 control 0 1 Stop Operation
Watchdog timer detection time 00 01 10 11 216/fC (approximately 3.28ms @ fc = 20MHz) 218/fC (approximately 13.1ms @ fc = 20MHz) 220/fC (approximately 52.4ms @ fc = 20MHz) 222/fC (approximately 210ms @ fc = 20MHz)
Watchdog timer enable/disable control 0 1 Disabled Enabled
Figure 3.14.4 Watchdog Timer Mode Register
7
Bit symbol WDCR (0111H) Read/Write After reset Function
6
5
4
- W -
3
2
1
0
B1H: WDT disable code 4EH: WDT clear code
WDT disable/clear control B1H 4EH Others Disable code Clear code Don't care
Figure 3.14.5 Watchdog Timer Control Register
92CD54I-272
2006-01-27
TMP92CD54I
7
bit Symbol CLKMOD (010AH) Read/Write After reset 1 Standby mode 00: IDLE3 01: STOP 10: IDLE1 11: IDLE2 HALTM1 R/W 1 -
6
HALTM0
5
-
4
R/W 0
Fixed to "0"
3
-
2
CLKOE 0 CLKoutput enable 0: not output 1: output
1
CLKM1 R/W 0
0
CLKM0 0
Function
CLK output select 00: fc 01: Reserved 10: 2/5 fc 11: Reserved
CLK output clock select 00 01 10 11 fc Reserved 2/5 fc Reserved
CLK output enable 0 1 Not output (Pull up) Output
Selects standby mode by HALT instruction 00 01 10 11 IDLE3 STOP IDLE1 IDLE2
Figure 3.14.6 Clock Mode Register
92CD54I-273
2006-01-27
TMP92CD54I 3.14.3 Operation
The watchdog timer generates an INTWD interrupt when the detection time set in the WDMOD has elapsed. The watchdog timer must be zero-cleared in software before an INTWD interrupt will be generated. If the CPU malfunctions (i.e. if runaway occurs) due to causes such as noise, but does not execute the instruction used to clear the binary counter, the binary counter will overflow and an INTWD interrupt will be generated. The CPU will detect malfunction (runaway) due to the INTWD interrupt and in this case it is possible to return to the CPU to normal operation by means of an anti-mulfunction program. The watchdog timer begins operating immediately on release of the watchdog timer reset. The watchdog timer is reset and halted in IDLE1, IDLE3 or STOP Modes. When the device is in IDLE2 mode, the operation of WDT depends on the WDMOD setting. Ensure that WDMOD is set before the device enters IDLE2 Mode. Example: i) Clear the binary counter.
WDCR 01001110 101----0--X---10110001 Write the clear code (4EH).
ii) Set the watchdog timer detection time to 218/ fC.
WDMOD
iii) Disable the watchdog timer.
WDMOD WDCR Clear bit to 0. Write the disable code (B1H).
92CD54I-274
2006-01-27
TMP92CD54I
3.15 RAM control
RAM control register (RAMCR) has bit for inhibition to write data to internal RAM and bit to detect lower voltage under VSTB level. VSTB level is the voltage level impossible to keep the data of Internal RAM. Only data "1" can be written to RAMCR, and data "0" can't be written. When RAMCR is set to "1" by software, in the case of voltage drop under VSTB level RAMCR is reset to "0". After power on RAMCR is reset to "0". RAMCR is not changed by standby operation and reset operation. The detection of reset operation (Warm reset / Power-on reset) and the condition of RAM data (kept / lost) is enable, to read RAMCR. RAM Write Inhibit bit is used for inhibition to write data to internal RAM. After reset RAMCR is set to "1", writing data to internal RAM is accepted. When RAMCR is set to "0", writing data to internal RAM is inhibited.
7 6 RAMSTB RAMWI R/W 0 *Note1 1
0:lost data
or Power on reset 1:kept data
RAMCR (016DH)
Bit Symbol Read/Write After reset
5 -
4 -
3 -
2 -
1 -
0 -
Function
Internal RAM write 0:Inhibit 1:accept
Write control to Internal RAM 0 Inhibit to write to Internal RAM 1 Accept to write to Internal RAM
RAM standby flag 0 1 After "1" is set by software, this bit is reset to "0" at VCC3 VSTB. After power on reset. After "1" is set by software, this data isn't changed at VCC3VSTB.
Note1: After power-on reset, initialized to 0. No change by warm reset. Use after setting to 1 by software. 0 cannot be written by software. Note2: When changed to STOP or Idle3 in HALT mode with RAMCR set to 1, current flows. Note3: Emulator doesn't support RAM control functions. Note4: To set to RAMCR bit to "1", need 8 state (@ fc = 20MHz; For that time, do not set Idle2, 3 or STOP mode.). After that, the power-supply detection circuit runs. Note5: VCC3 means internal voltage. (Note) There are restrictions at un-use of Voltage regulator (see section "4.2 DC Electrical Characteristics").
92CD54I-275
2006-01-27
TMP92CD54I
3.16 Timer for Real Time Clock (RTC)
TMP92CD54I features a timer which is used for real time count. An interrupt (INTRTC) can be generated every 0.0625 s, 0.125 s, 0.25 s, 0.50 s, 1 s or 2 s by using the low-frequency 32.768kHz clock. A clock function can be easily used. Timer for Real Time Clock can operate in all mode in which a low frequency oscillation is operated. (except STOP mode) In addition, INTRTC can return the device from every standby mode except STOP mode to the NORMAL mode.
3.16.1 Block diagram
RTCCR RTCCR RTCFC RUN /CLEAR
fs (32.768 kHz)
Selector
INTRTC interrupt
XT1
XT2
Low Frequency OSC
2
11
22
12
13
2
14
2
15
2
16
14-stage binary counter
RTCFC
Figure 3.16.1 Block diagram for timer for real-time clock
3.16.2 SFRs
RTC has 2 registers. Timer for Real Time Clock is controlled by Timer for Real-Time Clock Control Register (RTCCR). The period of interrupt request INTRTC is selected from 6 types by setting . To start/stop the counter is controlled by . The low frequency oscillator is controlled by Timer for Real Time Function Register(RTCFC). If it is released from STOP mode, without RESET input, RTCFC will be initialized. Figure 3.16.2 and 3.16.3 show these registers.
92CD54I-276
2006-01-27
TMP92CD54I
Timer for Real Time Clock Control Register 7
RTCCR (118H)
Bit symbol Read/Write After Reset R/W 0 Write 0 Function 0
1x0:216/fs (2s) 1x1:215/fs (1s)
6
-
5
-
4
-
3
RTCSEL2
2
RTCSEL1 R/W 0
1
RTCSEL0 0
0
RTCRUN R/W 0 0: Stop& Clear 1: Run
000:214/fs(0.50s) 001:213/fs(0.25s) 010:212/fs(0.125s) 011:211/fs(0.0625s)
x:Don't care
Counting operation 0 1 Stop & Clear Count
Interrupt generation cycle (fs = 32.768 kHz) 000 001 010 011 1x0 1x1 0.50s 0.25s 0.125s 0.0625s 2s 1s
Figure 3.16.1 Timer for Real Time Clock Control Register
Timer for Real Time Clock Function Register 7
RTCFC (119H)
Bit symbol Read/Write After Reset XTSEL R/W 0
Type of low frequency
6
-
5
-
4
-
3
-
2
-
1
-
0
XTEN R/W 0
Low Frequency oscillator (fs)
0:Stop 1:Oscillation
Function
oscillator(fs) 0: Crystal 1: CR
Low frequency oscillator (fs=32.768 kHz) 0 Stop 1 Oscillation
Note1: Please consider the stability-time for the oscillator. Note2: If it released from STOP mode, RTCFC register will be initiallized without a RESET input. Therefore, it is necessary to set up RTCFC register again after releaseing from STOP mode. Figure 3.16.2 Timer for Real Time Clock Function Register Example of register setting:
LD LD (RTCFC),01h : (RTCCR),03h ; L-OSC start ; (Wait for the stability-time) 13 ; Run at 2 /fs
92CD54I-277
2006-01-27
TMP92CD54I 3.16.3 CR oscillation
RTC can also work by using CR oscillator within. And oscillation type is controlled by the RTCFC. If XTSEL bit is set, CR oscillation is available. And when CR oscillation is used in the application, it is necessary to supplement external resistor and capacitor to XT1, XT2 pins. A recommended external circuit is shown the following figure "Figure 3.16.3". And "Figure3.16.4" shows CR oscillation frequency related to the combination of resistor and capacitor, provided that measurement environment is the typical condition described below.
XT1
R
Low Frequency OSC
C
XT2
TMP92CD54I
Figure 3.16.3 A external circuit for CR oscillation
(Note) Please adjust the value R and C for the application set. For example, we confirmed as follows, 1) R = 40kOhm and C = 470pF 2) R = 82kOhm and C = 220pF at condition of 32.768kHz and room temperature.
92CD54I-278
2006-01-27
I
TMP92CD54I
3.17 Voltage Regulator
3V output regulator for the internal logic power supply is installed in TMP92CD54I. The power supply is supplied to internal logic by connecting each DVCC3 terminal with regulator output terminal REGOUT. This regulator can control use/nonuse with the terminal REGEN. Table3.17.1 REGOUT output by REGEN setting REGEN input REGOUT output "H" 3V output for internal logic Note) "OPEN" 3V output for internal logic "L" 0V output (Do not connect GND) Note) As for REGEN, use with OPEN is also possible because of an internal pull-up. When the regulator is not used, it is necessary to supply the power supply to internal logic separately.
3.17.1 Block diagram
DVCC5 BGR
PASS Tr
REGOUT
FEEDBACK LOOP
REGEN
DVSS
Diagram 3.17.1 Regulator block
3.17.2 External connecting
For the oscillation prevention of the output voltage, connect stabilization capacitor (Cs) with the place between REGOUT and DVSS as near the terminal as possible. It is necessary to add resistance (ESR) to Cs serially according to the substrate capacity as shown in Figure 3.17.2. Because the change in internal resistance by the temperature might become the destabilizing factor of the regulator output about the selection of the capacitor, we will recommend the use of the capacitor with a good temperature characteristic. Moreover, recommend bypass capacitor (Cb) to be connected as a noise tolerance improvement of the REGOUT output between DVCC3-DVSS.
92CD54I-279
2006-01-27
I
TMP92CD54I
DVCC5
DVCC3 Cb
TMP92CD54I
REGOUT Cin DVSS Cs REGEN ESR OPEN
diagram 3.17.2 Regulator connection
3.17.3 Directions
Application This regulator is designed for TMP92CD54I. Do not connect the output from REGOUT except the terminal DVCC3 of TMP92CD54I. Timing of when power supply is turned on and REGEN input signal When the power supply is turning on, keep the REGEN terminal OPEN or input the enable signal (H level) to the terminal REGEN after at least 1us passes from the power supply turning on.
VDD5 REGEN
90%
1us min
90%
The number of wires of Cs, Cb and ESR Depending on modular composition, its stray capacitance and parasitic capacitance might influence the regulator characteristic. Investigating the characteristic about the static characteristic and the transient characteristic along actual use conditions, the number of wires should be decided according to the margin of Cin, Cs, Cb and ESR.
92CD54I-280
2006-01-27
TMP92CD54I
4. Electrical Characteristics
4.1 Absolute Maximum Ratings
Parameter Power Supply Voltage Input Voltage Output Current(total) Output Current(total) Power Dissipation(Ta=85degree C) Soldering Temperature(10s) Storage Temperature Operation Temperature Symbol VCC5 VIN
IOL IOH
PD TSOLDER TSTG TOPR
Rating -0.5 to 6.0 -0.5 to VCC5+0.5 100 -100 600 260 -65 to 150 -40 to 85
Unit V V mA mA mW degree C degree C degree C
Note:
The absolute maximum ratings are rated values that must not be exceeded during operation, even for an instant. Any one of the ratings must not be exceeded. If any absolute maximum rating is exceeded, a device may break down or its performance may be degraded, causing it to catch fire or explode resulting in injury to the user. Thus, when designing products that include this device, ensure that no absolute maximum rating value will ever be exceeded.
92CD54I-281
2006-01-27
TMP92CD54I 4.2 DC Electrical Characteristics
Vcc5 =4.5V to 5.25V / fc = 16 to 20MHz / Ta = -40 to 85 degree C
Parameter Supply Voltage
Input Low Voltage
Symbol VCC5 VIL0
Condition
Min 4.5 -0.3
Max 5.25 0.8
Unit V V
P00 to P07(D0 to 7) PG0 to PG7 PL0 to PL3
Input Low Voltage
P00 to P07(PORT) P40 to P47
Input Low Voltage
VIL1
-0.3
0.3*VCC5
V
INT0 NMI RESET P70, P71, P73 to P75 VIL2 PC0 to PC5 PD0 to PD7 PF0 to PF7 PM0 to PM4 P72, PN0 to PN6 VIL6
Input Low Voltage
-0.3
0.25*VCC5
V
-0.3 -0.3
0.3*VCC5 0.3 0.2*VCC3 0.2*VCC3
V V V V
AM0 to AM1 TEST0 to TEST1
Input Low Voltage
VIL3 VIL4 VIL5 VIH0
X1, XT1 (Crystal)
Input Low Voltage
* Vcc3 = 3.3V * Vcc3 = 3.3V
-0.3 -0.3
XT1 (CR)
Input High Voltage
P00 to P07(D0 to 7) PG0 to PG7 PL0 to PL3
Input High Voltage
2.2
VCC5+0.3
V
P00 to P07 P40 to P47
Input High Voltage
VIH1
0.7*VCC5
VCC5+0.3
V
INT0 NMI RESET P70, P71, P73 to P75 VIH2 PC0 to PC5 PD0 to PD7 PF0 to PF7 PM0 to PM4 P72, PN0 to PN6 VIH6
Input High Voltage
0.75*VCC5
VCC5+0.3
V
0.7*VCC5 VCC5-0.3
VCC5+0.3 VCC5+0.3 VCC3+0.3 VCC3+0.3
V V V V
AM0 to AM1 TEST0 to TEST1
Input High Voltage
VIH3 VIH4 VIH5
X1, XT1 (Crystal)
Input High Voltage
* Vcc3 = 3.3V * Vcc3 = 3.3V
0.8*VCC3 0.7*VCC3
XT1 (CR)
92CD54I-282
2006-01-27
TMP92CD54I
Parameter
Output Low Voltage
Symbol VOL VOH0 VOH1 VOH2 VOHn ILI ILO ICC5
ICC5IDLE2 ICC5IDLE1
Condition IOL = 3.0mA IOH = -400uA IOH = -100uA IOH = -20uA IOH = -200uA, PF6(TX) pin 0.0 Vin VCC5 0.2 Vin VCC5-0.2 VCC5=5.25V , X1=10MHz(Internal 20MHz)
IDLE2 Mode IDLE1 Mode IDLE3 Mode STOP Mode
Min 2.4 0.75*VCC5 0.9*VCC5 0.82*VCC5 0.02(typ.) 0.05(typ.) 70(typ)
Max 0.4
Unit V
Output High Voltage
V
Input Leakage Current Output Leakage Current Operating Current
+/- 5 +/- 10 100 90
uA uA mA
(Single Chip)*
VCC5=5.25V, X1=10MHz(Internal 20MHz)
mA
VCC5=5.25V, X1=10MHz(Internal 20MHz)
30 220 140 200 120 3.0 5.25 uA uA V
K ohm
Operating Current
(Stand-by)
ICC5IDLE3 ICC5STOP
VCC5=5.25V, Ta = -40 to 85 degree C VCC5=5.25V, Ta = -10 to 55 degree C VCC5=5.25V, Ta = -40 to 85 degree C VCC5=5.25V, Ta = -10 to 55 degree C
VCC3 < VCC5 , VIH160
220
0.4
1.0(typ.)
V
92CD54I-283
2006-01-27
TMP92CD54I
4.3 AC Characteristics
Read cycle
No. 1 2 3 4 5-1 5-2 6-1 6-2 7-1 7-2 8 9 10 11 12 13 14 15 Parameter OSC period (X1/X2) System Clock period (=T) CLK Low Width CLK High Width A0 to A23 Valid D0 to D7 Input 0WAIT A0 to A23 Valid D0 to D7 Input 1WAIT RD Fall D0 to D7 Input 0WAIT RD Fall D0 to D7 Input 1WAIT RD Low Width 0WAIT RD Low Width 1WAIT A0 to A23 Valid RD Fall RD Fall CLK Fall A0 to A23 Valid D0 to D7 Hold RD Rise D0 to D7 Hold A0 to A23 Valid PORT Input A0 to A23 Valid PORT Hold WAIT Set-up Time WAIT Hold Time Symbol tOSC tCYC tCL tCH tAD tAD3 tRD tRD3 tRR tRR3 tAR tRK tHA tHR tAPR tAPH tTK tKT Min 100 50 0.5xT-15 0.5xT-15 VCC5=4.5 to 5.25V5%, TA=--40 to 85 degree C Max 20MHz 16MHz Unit 125 100 125 ns 62.5 50 62.5 ns 10 16 ns 10 16 ns 2.0xT-50 50 75 ns 3.0xT-50 100 138 ns 1.5xT-45 30 49 ns 2.5xT-45 80 111 ns 55 74 ns 105 136 ns 5 11 ns 5 11 ns 0 0 ns 0 0 ns 2.0xT-120 -20 5 ns 100 125 ns 15 15 ns 5 5 ns
1.5xT-20 2.5xT-20 0.5xT-20 0.5xT-20 0 0 2.0xT 15 5
Write cycle
No. 1 2 3 4 5-1 5-2 6-1 6-2 7 8 9 10 11 12 13 14 Parameter OSC period (X1/X2) System Clock period (=T) CLK Low Width CLK High Width D0 to D7 Valid WR Rise 0WAIT D0 to D7 Valid WR Rise 1WAIT WR Low Width 0WAIT WR Low Width 1WAIT A0 to A23 Valid WR Fall WR Fall CLK Fall WR Fall A0 to A23 Hold WR Fall D0 to D7 Hold A0 to A23 Valid PORT Output WAIT Set-up Time WAIT Hold Time RD Rise D0 to D7 Output Symbol tOSC tCYC tCL tCH tDW tDW3 tWW tWW3 tAW tWK tWA tWD tAPW tTK tKT tRDO Min 100 50 0.5xT-15 0.5xT-15 1.25xT-35 2.25xT-35 1.25xT-30 2.25xT-30 0.5xT-20 0.5xT-20 0.25xT-5 0.25xT-5 15 5 1.25xT-35 Max 125 62.5
VCC5=5.0V5%, TA=--40 to 85 degree C 20MHz 100 50 10 10 28 78 33 83 5 5 8 8 170 15 5 20 16MHz 125 62.5 16 16 43 106 48 111 11 11 11 11 195 15 5 26 Unit ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns
2.0xT+70
AC Condition Output :
Input
:
D0 to D7, A0 to A7, A8 to A15, A16 to A23, RD, WR High 2.0V, Low 0.8V, CL=50pF Others High 2.0V, Low 0.8V, CL=50pF D0 to D7 High 2.4V, Low 0.45V, CL=50pF Others High 0.8xVCC5, Low 0.2xVCC5
92CD54I-284
2006-01-27
TMP92CD54I
(1) Read cycle (0 wait)
tOSC
X1
tCYC tCL
CLK (fc)
tCH
tTK
WAIT
tKT
A0 to A23
tAD
CS
tHA tAR
RD
tRK
tHR tRR tRD
D0 to D7
Data Input
tAPH tAPR
Port input
Port Input
Note
:
The phase relation between X1 input signal and the other signals is unsettled. The timing chart above is an example.
92CD54I-285
2006-01-27
TMP92CD54I
(2) Write cycle (0 wait)
tOSC
X1
tCYC tCL
CLK (fc)
tCH
tTK
WAIT
tKT
A0 to A23
CS
tAW
WR
tWK
tWA
tWW tDW
D0 to D7
tWD
tRDO
RD
Data Output
tAPW
Port output
Note
:
The phase relation between X1 input signal and the other signals is unsettled. The timing chart above is an example.
92CD54I-286
2006-01-27
TMP92CD54I
(3) Read cycle (1 wait) CLK (fc) WAIT
A0 to A23
tAD3
CS
RD
tRD3
D0 to D7
tRR3
Data Input
(4) Write cycle (1 wait) CLK (fc) WAIT
A0 to A23
CS
WR
tDW3
D0 to D7 RD
tWW3
Data Output
tRDO
92CD54I-287
2006-01-27
TMP92CD54I
4.4 AD Conversion Characteristics
Symbol VREFH VREFL AVCC AVSS AVIN IREF Parameter Analog reference voltage() Analog reference voltage() AD Converter Power Supply Voltage AD Converter Ground Analog Input Voltage Analog Current for analog reference voltage =1 =0 Total error (excluding quantize error) Min
VCC5-0.2
VSS5
VCC5-0.2
VSS5 VREFL
Typ VCC5 VSS5 VCC5 VSS5 0.8 0.02
MAX VCC5 VSS5 VCC5 VSS5 VREFH 1.2 5 3.0
Unit
V
mA uA LSB
ET
Note) "LSB" is the UNIT which means the resolution of AD CONVERTER. (+/- 3 LSB = 3 * VCC/1024 = +/-15mV)
4.5 Event Counter (TI0, TI4, TI8, TI9, TIA, TIB)
Parameter Symbol
Clock Cycle Clock Low Width Clock High Width
tVCK tVCKL tVCKH
Variable Min Max 8T+100 4T+40 4T+40
20MHz Min Max 500 240 240
16MHz Min Max 600 290 290
Unit ns ns ns
4.6 Serial Channel Timing
(1) SCLK Input mode (I/O Interface mode)
Parameter SCLK Cycle Output Data SCLK Rise SCLK Rise Output Data Hold SCLK Rise Input Data Hold SCLK Rise Input Data Valid
Symbol
Variable Min 16T tSCY/2-4T -110 tSCY/2+2T 3T+10 tSCY Max
tSCY tOSS tOHS tHSR tSRD
20MHz Min Max 0.8 90 500 160 800
16MHz Min Max 1.0 140 625 197.5 1000
Unit us
ns
(2) SCLK Output mode (I/O Interface mode)
Parameter SCLK Cycle (programmable) Output Data SCLK Rise SCLK Rise Output Data Hold SCLK Rise Input Data Hold SCLK Rise Input Data Valid
Symbol
Variable Min 16T tSCY/2-40 tSCY/2-40 0 tSCY/2-T -180 Max 8192T
tSCY tOSS tOHS tHSR tSRD
20MHz Min Max 0.8 409.6 360 360 0 570
16MHz Min Max 1.0 512 460 460 0 757.5
Unit us
ns
92CD54I-288
2006-01-27
TMP92CD54I
tSCY
SCL
tOSS
OUTPUT DATA TxD INPUT DATA RxD
0
tOHS
1
tSRD
VALID
tHSR
VALID
(3) SCLK Input mode (UART mode) (Preliminary)
Parameter SCLK Cycle SCLK Low level Pulse width SCLK High level Pulse width
Symbol
TSCY TSCYL TSCYH
Variable Min Max 4T + 20 2T + 5 2T + 5
20MHz Min Max 220 105 105
16MHz Min Max 270 130 130
Unit
ns
4.7 Interrupt Operation
Parameter NMI,INT0 Low Width NMI,INT0 High Width WUINT0 to WUINT7, INT1 to INT7 Low Width WUINT0 to WUINT7, INT1 to INT7 High Width
Symbol
Variable Min 4T 4T 8T+100 8T+100 Max
TINTAL TINTAH TINTBL TINTBH
20MHz Min Max 200 200 500 500
16MHz Min Max 250 250 600 600
Unit
ns
92CD54I-289
2006-01-27
TMP92CD54I
4.8 Serial bus interface
I2CBUS-AC-SPEC TABLE (fc=)
No PARAMETER
SYMBOL UNIT
(fc=System clock) Existing rate MIN MAX
0
KH MIN MAX 0 650 1300 600 400 -
100KHz MIN MAX 0 4500 4700 4000 100 -
1 SCL clock frequency
KHz ns ns ns ns ns ns
fc/(2 +8) -
n
Hold time (repeated) START condition. 2 After this period, the first clock pulse is generated. HDSTA 3 LOW period of the SCL clock 4 HIGH period of the SCL clock 5 Set-up time for a repeated START condition LOW HIGH SUSTA
2 /fc 2 /fc (2 +8)/fc
n-1 n-1
n-1
by software 0 100 950 900 300 (receive) 300 400 0.2VDD5 0.2VDD5 0 50
by software 0 250 4200 3450 -
by software
0
Data hold time: 6 for CBUS compatible masters for I2C-bus devices HDDAT 7 Data set-up time Data set-up time ' (The case in the first bit after transfer ) 8 Rise time of both SDA and ACL signals (*1) SUDAT
6/fc -
(2 -6)/fc
n-1
n-1
SU1stDAT r SUSTO BUF Cb VnL VnH tsp ns ns ns ns pF v v ns
(2 -12)/fc 1000 (receive) 300 400
n-1
9 Fall time of both SDA and ACL signals 10 Set-up time for STOP condition Bus free time between a STOP and START 11 condition 12 Capacitive load for each cus line Noise margin at the LOW level for each connected 13 device (including hysteresis) Noise margin at the HIGH level for each connected 14 device (including hysteresis) Pulse width of spikes which must be 15 suppressed by the input filter Note 1 All values referred to VIHmin and VILmax levels.
-
(2 +12)/fc
400
by software
by software
by software
0.2VDD5 0.2VDD5 n/a
-
0.2VDD5 0.2VDD5 n/a
-
n/a
n/a
S SDA
SU:1stDAT SU:DAT HIGH
Sr
P
S
f
SCL
LOW
HD:STA
SP
r
BUF
HD:STA
S : Start P :Stop
r
HD:DAT
f
SU:STA
SU:STO
Sr : ReStart
*1) I2BUS CLK AC SPEC : Tr (Transmitter selection )
Vih SCLK
T-Low SCK(0001 - 0110) SCK(1111) :100KHz SCK(1000) :400KHz 2*(n-1)/fc 100/fc 32/fc 0 to 2/fc 0 0 0
Tr
T-High (2*(n-1)+8)/fc 100/fc 18/fc
SCK(0001 - 0110) SCK(1111) :100KHz SCK(1000) :400KHz
Tr T-R T-R T-R
4/fc to 6/fc 2/fc to 4/fc 4/fc 4/fc 2/fc 4/fc
6/fc to 8/fc 8/fc to 10/fc 8/fc 8/fc 8/fc 6/fc
.... .... .... ....
T-period = T-Low + T-R + T-High
Example: in the case of fc=20MHz, SCK3,2,1,0=(0001), Tr=200ns 1) Tr=200ns so T-R=4/fc 2) T-period = 2*(n-1)/fc + 4/fc + (2*(n-1)+8)/fc =76/fc =3.8us
92CD54I-290
2006-01-27
TMP92CD54I
4.9 Serial Expansion Interface
Symbol t SECLK t LEAD t LAG t SCKH t SCKL t SU tH tV t HO Parameter SECLK Cycle SS fall SECLK SECLK SS rise SECLK High Pulse Width SECLK Low Pulse Width Input Data Set-up Input Data Hold Output Data Valid Output Data Hold Variable Min Max 5T 40T 4T 4T t SECLK /2-9 t SECLK /2-9 t SECLK /4-10 t SECLK /4 t SECLK /4 0 20MHz Min 250 200 200 116 116 52 62 0 Max 2000 Unit ns ns ns ns ns ns ns ns ns
62
a) SEI Master (CPHA=0) SS tSECLK SECLK tSCKL SECLK tSU MISO MOSI MSB Input MSB Output bit6 to 1 bit6 to 1 tH LSB Input tV LSB Output tHO tSCKH
b) SEI Master (CPHA=1) SS tSECLK SECLK SECLK tSU MISO MOSI MSB Input MSB Output bit 6 to 1 bit 6 to 1 tH LSB Input tV LSB Output tHO
92CD54I-291
2006-01-27
TMP92CD54I
c) SEI Slave (CPHA=0) SS tLEAD SECLK SECLK tHO MISO MOSI MSB Output tSU MSB Input tV bit 6 to 1 bit 6 to 1 LSB Output tH LSB Input tSCKH tSCKL tLAG
d) SEI Slave (CPHA=1) SS tLEAD SECLK tSCKL SECLK tV MISO MOSI MSB Output tSU MSB Input bit 6 to 1 bit 6 to 1 tHO LSB Output tH LSB Input tSCKH tLAG
4.10 Controller Area Network (CAN)
Symbol tcclk tp Parameter CAN Clock period Tx edge Rx Input Variable Min 2T Max 2tcclk-20 Min 100 20MHz Max 180 Unit ns ns
Tx
Rx
tp
tp
92CD54I-292
2006-01-27
TMP92CD54I
4.11 Voltage regulator
Voltage Regurator
Parameter Output Voltage Output Current Quiescent Current Symbol REGOUT Iro Iq Iq1 Iop Is
Vcc5 =4.5V to 5.25V / fc = 16 to 20MHz / Ta = -40 to 85 degree C / Iload =10uA
Condition Vin-REGOUT=1.0V Iro10 uA 10 uAIro100mA (Ta=25) Iro=150mA REGEN=0 (Regulator Only) Min. 3.0 0 30 15 6 Typ. 50 250 8 0.1 Max. 3.6 150 100 800 10 0.2 Unit. V mA A A mA A
Standby Current
0.5[Ohm] ESR5.0[Ohm] Parameter Stabilization capactor Bypass capactor Input capactor Equivalent Series Resistor Symbol Cs Cb Cin (Note) ESR Condition Cb=10uF, ESR=4.7 Cs=10uF, ESR=4.7 (Cs>=Cb) Cs=10uF, ESR=4.7 Cs=10uF Cb=0.1uF Min. 0.1 0.1 4.7 0.5 Typ. Max. 10 10 22 5 Unit. F F F
0.5[Ohm] ESR50[Ohm] Parameter Stabilization capactor Bypass capactor Input capactor Equivalent Series Resistor Symbol Cs Cb Cin (Note) ESR Condition Cb=0.6uF, ESR=47 Cs=10uF, ESR=47 (Cs>=Cb) Cs=10uF, ESR=47 Cs=10uF Cb=0.6uF Min. 0.1 0.6 4.7 0.5 Typ. Max. 10 10 22 50 Unit. F F F
0.5[Ohm] ESR100[Ohm] Parameter Stabilization capactor Bypass capactor Input capactor Symbol Cs Cb Cin (Note) ESR Condition Cb=1.0uF, ESR=100 Cs=10uF, ESR=100 (Cs>=Cb) Cs=10uF, ESR=100 Min. 0.1 1.0 4.7 0.5 Typ. Max. 10 10 22 100 Unit. F F F
Equivalent Cs=10uF Cb=1.0uF Series Resistor Note: Recommend Tantalum Capacitor.
DVCC3
Cb
TMP92CD54I
DVCC5
Cin
REGOUT REGEN
Cs ESR
DVSS
OPEN
92CD54I-293
2006-01-27
TMP92CD54I
5. Table of special function registers (SFRs) (SFR ; Special Function Register)
The special function registers (SFRs) include the I/O ports and peripheral control registers allocated to the 1024 byte addresses from 000000H to 0003FFH. (1) I/O port (2) 8-bit Timer control (3) 16-bit Timer control (4) Serial Channel control (5) Serial Expansion Interface control (6) Interrupt control (7) DMA controller (8) Control register (9) A/D converter control (10)Memory controller (11)Serial Bus Interface control (12)CAN control (13)RTC control Configuration of the table
Symbol Name Address 7 6 5 4 3 2 1 0 bit Symbol Read/Write Initial value after reset Remarks
Explanations of symbols R/W R W Either read or write is possible Only read is possible Only write is possible
no RMWProhibit Read Modify Write (Prohibit RES / SET / TSET / CHG / STCF / ANDCF / ORCF / XORCF etc.)
92CD54I-294
2006-01-27
TMP92CD54I
Table 6 I/O register address map [1] Port :
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0000H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
P0 (Reserved) P0CR P0FC (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0010H 11H 12H 13H 14H 15H 16H 17H 18H 19H 1AH 1BH 1CH 1DH 1EH 1FH
P4 (Reserved) P4CR P4FC (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) P7 (Reserved) P7CR P7FC
0020H 21H 22H 23H 24H 25H 26H 27H 28H 29H 2AH 2BH 2CH 2DH 2EH 2FH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0030H 31H 32H 33H 34H 35H 36H 37H 38H 39H 3AH 3BH 3CH 3DH 3EH 3FH
PC (Reserved) PCCR PCFC PD (Reserved) PDCR PDFC (Reserved) (Reserved) (Reserved) (Reserved) PF (Reserved) PFCR PFFC
[2] SEI :
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0040H 41H 42H 43H 44H 45H 46H 47H 48H 49H 4AH 4BH 4CH 4DH 4EH 4FH
PG (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0050H 51H 52H 53H 54H 55H 56H 57H 58H 59H 5AH 5BH 5CH 5DH 5EH 5FH
(Reserved) (Reserved) (Reserved) (Reserved) PL (Reserved) (Reserved) (Reserved) PM PMODE PMCR PMFC PN PNODE PNCR PNFC
0060H 61H 62H 63H 64H 65H 66H 67H 68H 69H 6AH 6BH 6CH 6DH 6EH 6FH
SECR0 SESR0 SEDR0 (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0070H 71H 72H 73H 74H 75H 76H 77H 78H 79H 7AH 7BH 7CH 7DH 7EH 7FH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
Note: Do not access the without allocated names.
92CD54I-295
2006-01-27
TMP92CD54I
[3] 8-bit Timer :
ADDRESS
[4] 16-bit Timer :
ADDRESS
NAME
NAME
ADDRESS
NAME
ADDRESS
NAME
0080H 81H 82H 83H 84H 85H 86H 87H 88H 89H 8AH 8BH 8CH 8DH 8EH 8FH
TRUN01 (Reserved) TREG0 TREG1 TMOD01 TFFCR1 (Reserved) (Reserved) TRUN23 (Reserved) TREG2 TREG3 TMOD23 TFFCR3 (Reserved) (Reserved)
0090H 91H 92H 93H 94H 95H 96H 97H 98H 99H 9AH 9BH 9CH 9DH 9EH 9FH
TRUN45 (Reserved) TREG4 TREG5 TMOD45 TFFCR5 (Reserved) (Reserved) TRUN67 (Reserved) TREG6 TREG7 TMOD67 TFFCR7 (Reserved) (Reserved)
00A0H A1H A2H A3H A4H A5H A6H A7H A8H A9H AAH ABH ACH ADH AEH AFH
TRUN8 (Reserved) TMOD8 TFFCR8 (Reserved) (Reserved) (Reserved) (Reserved) TREG8L TREG8H TREG9L TREG9H CAP8L CAP8H CAP9L CAP9H
00B0H B1H B2H B3H B4H B5H B6H B7H B8H B9H BAH BBH BCH BDH BEH BFH
TRUNA (Reserved) TMODA TFFCRA (Reserved) (Reserved) (Reserved) (Reserved) TREGAL TREGAH TREGBL TREGBH CAPAL CAPAH CAPBL CAPBH
[5] SIO :
ADDRESS
NAME
00C0H C1H C2H C3H C4H C5H C6H C7H C8H C9H CAH CBH CCH CDH CEH CFH
SC0BUF SC0CR SC0MOD0 BR0CR BR0ADD SC0MOD1 (Reserved) (Reserved) SC1BUF SC1CR SC1MOD0 BR1CR BR1ADD SC1MOD1 (Reserved) (Reserved)
92CD54I-296
2006-01-27
TMP92CD54I
[6] INTC :
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
00D0H D1H D2H D3H D4H D5H D6H D7H D8H D9H DAH DBH DCH DDH DEH DFH
INTE12 INTE34 INTE56 INTE7 INTET01 INTET23 INTET45 INTET67 INTET89 INTETAB INTETO8A INTES0 INTES1 INTECRT INTECG INTESEE0
00E0H E1H E2H E3H E4H E5H E6H E7H E8H E9H EAH EBH ECH EDH EEH EFH
INTESED0 INTERTC INTESB2 INTESB0 INTESB1 INTMK0 INTMK1 INTMK2 INTMK3 INTMK4 INTMK5 (Reserved) WUPFLAG WUPMOD WUPEDGE WUPMASK
00F0H F1H F2H F3H F4H F5H F6H F7H F8H F9H FAH FBH FCH FDH FEH FFH
INTE0AD INTETC01 INTETC23 INTETC45 INTETC67 (Reserved) IIMC INTNMWDT INTCLR (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0100H 101H 102H 103H 104H 105H 106H 107H 108H 109H 10AH 10BH 10CH 10DH 10EH 10FH
DMA0V DMA1V DMA2V DMA3V DMA4V DMA5V DMA6V DMA7V DMAB DMAR CLKMOD (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
[7] WDT, RTC :
ADDRESS
[8] 10-bit ADC :
ADDRESS
NAME
NAME
ADDRESS
NAME
0110H 111H 112H 113H 114H 115H 116H 117H 118H 119H 11AH 11BH 11CH 11DH 11EH 11FH
WDMOD WDCR (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) RTCCR RTCFC (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0120H 121H 122H 123H 124H 125H 126H 127H 128H 129H 12AH 12BH 12CH 12DH 12EH 12FH
ADREG0L ADREG0H ADREG1L ADREG1H ADREG2L ADREG2H ADREG3L ADREG3H ADREG4L ADREG4H ADREG5L ADREG5H ADREG6L ADREG6H ADREG7L ADREG7H
0130H 131H 132H 133H 134H 135H 136H 137H 138H 139H 13AH 13BH 13CH 13DH 13EH 13FH
ADREG8L ADREG8H ADREG9L ADREG9H ADREGAL ADREGAH ADREGBL ADREGBH ADMOD0 ADMOD1 (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
92CD54I-297
2006-01-27
TMP92CD54I
[9]MEMC :
ADDRESS
[10] SBI :
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0140H 141H 142H 143H 144H 145H 146H 147H 148H 149H 14AH 14BH 14CH 14DH 14EH 14FH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) BCSL BCSH MAMR MSAR (Reserved) (Reserved) (Reserved) (Reserved)
0150H 151H 152H 153H 154H 155H 156H 157H 158H 159H 15AH 15BH 15CH 15DH 15EH 15FH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0160H 161H 162H 163H 164H 165H 166H 167H 168H 169H 16AH 16BH 16CH 16DH 16EH 16FH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) FSWE ( Note ) (Reserved) RAMCR FLSR ( Note ) (Reserved)
0170H 171H 172H 173H 174H 175H 176H 177H 178H 179H 17AH 17BH 17CH 17DH 17EH 17FH
SBI0CR1 SBI0DBR I2C0AR
SBI0CR2/SBI0SR
SBI0BR0 SBI0BR1 (Reserved) (Reserved) SBI1CR1 SBI1DBR I2C1AR
SBI1CR2/SBI1SR
SBI1BR0 SBI1BR1 (Reserved) (Reserved)
(Note) Only TMP92FD54AI.
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0180H 181H 182H 183H 184H 185H 186H 187H 188H 189H 18AH 18BH 18CH 18DH 18EH 18FH
SBI2CR1 SBI2DBR I2C2AR
SBI2CR2/SBI2SR
SBI2BR0 SBI2BR1 (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
0190H 191H 192H 193H 194H 195H 196H 197H 198H 199H 19AH 19BH 19CH 19DH 19EH 19FH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
01A0H 1A1H 1A2H 1A3H 1A4H 1A5H 1A6H 1A7H 1A8H 1A9H 1AAH 1ABH 1ACH 1ADH 1AEH 1AFH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
01B0H 1B1H 1B2H 1B3H 1B4H 1B5H 1B6H 1B7H 1B8H 1B9H 1BAH 1BBH 1BCH 1BDH 1BEH 1BFH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
92CD54I-298
2006-01-27
TMP92CD54I
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
01C0H 1C1H 1C2H 1C3H 1C4H 1C5H 1C6H 1C7H 1C8H 1C9H 1CAH 1CBH 1CCH 1CDH 1CEH 1CFH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
01D0H 1D1H 1D2H 1D3H 1D4H 1D5H 1D6H 1D7H 1D8H 1D9H 1DAH 1DBH 1DCH 1DDH 1DEH 1DFH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
01E0H 1E1H 1E2H 1E3H 1E4H 1E5H 1E6H 1E7H 1E8H 1E9H 1EAH 1EBH 1ECH 1EDH 1EEH 1EFH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
01F0H 1F1H 1F2H 1F3H 1F4H 1F5H 1F6H 1F7H 1F8H 1F9H 1FAH 1FBH 1FCH 1FDH 1FEH 1FFH
(Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
[11] CAN:
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0200H 201H 202H 203H 204H 205H 206H 207H 208H 209H 20AH 20BH 20CH 20DH 20EH 20FH
MB0MI0L MB0MI0H MB0MI1L MB0MI1H MB0MCFL MB0MCFH MB0D0 MB0D1 MB0D2 MB0D3 MB0D4 MB0D5 MB0D6 MB0D7 MB0TSVL MB0TSVH
0210H 211H 212H 213H 214H 215H 216H 217H 218H 219H 21AH 21BH 21CH 21DH 21EH 21FH
MB1MI0L MB1MI0H MB1MI1L MB1MI1H MB1MCFL MB1MCFH MB1D0 MB1D1 MB1D2 MB1D3 MB1D4 MB1D5 MB1D6 MB1D7 MB1TSVL MB1TSVH
0220H 221H 222H 223H 224H 225H 226H 227H 228H 229H 22AH 22BH 22CH 22DH 22EH 22FH
MB2MI0L MB2MI0H MB2MI1L MB2MI1H MB2MCFL MB2MCFH MB2D0 MB2D1 MB2D2 MB2D3 MB2D4 MB2D5 MB2D6 MB2D7 MB2TSVL MB2TSVH
0230H 231H 232H 233H 234H 235H 236H 237H 238H 239H 23AH 23BH 23CH 23DH 23EH 23FH
MB3MI0L MB3MI0H MB3MI1L MB3MI1H MB3MCFL MB3MCFH MB3D0 MB3D1 MB3D2 MB3D3 MB3D4 MB3D5 MB3D6 MB3D7 MB3TSVL MB3TSVH
92CD54I-299
2006-01-27
TMP92CD54I
[11] CAN:
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0240H 241H 242H 243H 244H 245H 246H 247H 248H 249H 24AH 24BH 24CH 24DH 24EH 24FH
MB4MI0L MB4MI0H MB4MI1L MB4MI1H MB4MCFL MB4MCFH MB4D0 MB4D1 MB4D2 MB4D3 MB4D4 MB4D5 MB4D6 MB4D7 MB4TSVL MB4TSVH
0250H 251H 252H 253H 254H 255H 256H 257H 258H 259H 25AH 25BH 25CH 25DH 25EH 25FH
MB5MI0L MB5MI0H MB5MI1L MB5MI1H MB5MCFL MB5MCFH MB5D0 MB5D1 MB5D2 MB5D3 MB5D4 MB5D5 MB5D6 MB5D7 MB5TSVL MB5TSVH
0260H 261H 262H 263H 264H 265H 266H 267H 268H 269H 26AH 26BH 26CH 26DH 26EH 26FH
MB6MI0L MB6MI0H MB6MI1L MB6MI1H MB6MCFL MB6MCFH MB6D0 MB6D1 MB6D2 MB6D3 MB6D4 MB6D5 MB6D6 MB6D7 MB6TSVL MB6TSVH
0270H 271H 272H 273H 274H 275H 276H 277H 278H 279H 27AH 27BH 27CH 27DH 27EH 27FH
MB7MI0L MB7MI0H MB7MI1L MB7MI1H MB7MCFL MB7MCFH MB7D0 MB7D1 MB7D2 MB7D3 MB7D4 MB7D5 MB7D6 MB7D7 MB7TSVL MB7TSVH
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0280H 281H 282H 283H 284H 285H 286H 287H 288H 289H 28AH 28BH 28CH 28DH 28EH 28FH
MB8MI0L MB8MI0H MB8MI1L MB8MI1H MB8MCFL MB8MCFH MB8D0 MB8D1 MB8D2 MB8D3 MB8D4 MB8D5 MB8D6 MB8D7 MB8TSVL MB8TSVH
0290H 291H 292H 293H 294H 295H 296H 297H 298H 299H 29AH 29BH 29CH 29DH 29EH 29FH
MB9MI0L MB9MI0H MB9MI1L MB9MI1H MB9MCFL MB9MCFH MB9D0 MB9D1 MB9D2 MB9D3 MB9D4 MB9D5 MB9D6 MB9D7 MB9TSVL MB9TSVH
02A0H 2A1H 2A2H 2A3H 2A4H 2A5H 2A6H 2A7H 2A8H 2A9H 2AAH 2ABH 2ACH 2ADH 2AEH 2AFH
MB10MI0L MB10MI0H MB10MI1L MB10MI1H MB10MCFL MB10MCFH MB10D0 MB10D1 MB10D2 MB10D3 MB10D4 MB10D5 MB10D6 MB10D7 MB10TSVL MB10TSVH
02B0H 2B1H 2B2H 2B3H 2B4H 2B5H 2B6H 2B7H 2B8H 2B9H 2BAH 2BBH 2BCH 2BDH 2BEH 2BFH
MB11MI0L MB11MI0H MB11MI1L MB11MI1H MB11MCFL MB11MCFH MB11D0 MB11D1 MB11D2 MB11D3 MB11D4 MB11D5 MB11D6 MB11D7 MB11TSVL MB11TSVH
92CD54I-300
2006-01-27
TMP92CD54I
[11] CAN:
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
02C0H 2C1H 2C2H 2C3H 2C4H 2C5H 2C6H 2C7H 2C8H 2C9H 2CAH 2CBH 2CCH 2CDH 2CEH 2CFH
MB12MI0L MB12MI0H MB12MI1L MB12MI1H MB12MCFL MB12MCFH MB12D0 MB12D1 MB12D2 MB12D3 MB12D4 MB12D5 MB12D6 MB12D7 MB12TSVL MB12TSVH
02D0H 2D1H 2D2H 2D3H 2D4H 2D5H 2D6H 2D7H 2D8H 2D9H 2DAH 2DBH 2DCH 2DDH 2DEH 2DFH
MB13MI0L MB13MI0H MB13MI1L MB13MI1H MB13MCFL MB13MCFH MB13D0 MB13D1 MB13D2 MB13D3 MB13D4 MB13D5 MB13D6 MB13D7 MB13TSVL MB13TSVH
02E0H 2E1H 2E2H 2E3H 2E4H 2E5H 2E6H 2E7H 2E8H 2E9H 2EAH 2EBH 2ECH 2EDH 2EEH 2EFH
MB14MI0L MB14MI0H MB14MI1L MB14MI1H MB14MCFL MB14MCFH MB14D0 MB14D1 MB14D2 MB14D3 MB14D4 MB14D5 MB14D6 MB14D7 MB14TSVL MB14TSVH
02F0H 2F1H 2F2H 2F3H 2F4H 2F5H 2F6H 2F7H 2F8H 2F9H 2FAH 2FBH 2FCH 2FDH 2FEH 2FFH
MB15MI0L MB15MI0H MB15MI1L MB15MI1H MB15MCFL MB15MCFH MB15D0 MB15D1 MB15D2 MB15D3 MB15D4 MB15D5 MB15D6 MB15D7 MB15TSVL MB15TSVH
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
ADDRESS
NAME
0300H 301H 302H 303H 304H 305H 306H 307H 308H 309H 30AH 30BH 30CH 30DH 30EH 30FH
MCL MCH MDL MDH TRSL TRSH TRRL TRRH TAL TAH AAL AAH RMPL RMPH RMLL RMLH
0310H 311H 312H 313H 314H 315H 316H 317H 318H 319H 31AH 31BH 31CH 31DH 31EH 31FH
LAM0L LAM0H LAM1L LAM1H GAM0L GAM0H GAM1L GAM1H MCRL MCRH GSRL GSRH BCR1L BCR1H BCR2L BCR2H
0320H 321H 322H 323H 324H 325H 326H 327H 328H 329H 32AH 32BH 32CH 32DH 32EH 32FH
GIFL GIFH GIML GIMH MBTIFL MBTIFH MBRIFL MBRIFH MBIML MBIMH CDRL CDRH RFPL RFPH CECL CECH
0330H 331H 332H 333H 334H 335H 336H 337H 338H 339H 33AH 33BH 33CH 33DH 33EH 33FH
TSPL TSPH TSCL TSCH (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved)
ADDRESS
NAME
340H : : : : : 3FFH
(Reserved)
92CD54I-301
2006-01-27
TMP92CD54I (1) I/O Port
Port0
Symbol P0 Name PORT0 Register ADDRESS 00H 7 P07 0 P07C 0 6 P06 0 P06C 0 5 P05 0 P05C 0 4 P04 3 P03 2 P02 0 P02C 0 1 P01 0 P01C 0 0 P00 0 P00C 0 P0F W 0
P0CR
PORT0 Control Register PORT0 Function Register
02H (no RMW) 03H (no RMW)
R/W 0 0 Input/Output P04C P03C W 0 0 0:Input 1:Output -
P0FC
0:PORT 1:Data Bus(D7 to D0)
Port4
Symbol P4 Name PORT4 Register ADDRESS 10H 7 P47 0 P47C 0 P47F P4FC PORT4 Function Register 13H (no RMW) 0 0:PORT 1:A7 0 0:PORT 1:A6 0 0:PORT 1:A5 6 P46 0 P46C 0 P46F 5 P45 0 P45C 0 P45F 4 P44 3 P43 2 P42 0 P42C 0 P42F 0 0:PORT 1:A2 1 P41 0 P41C 0 P41F 0 0:PORT 1:A1 0 P40 0 P40C 0 P40F 0 0:PORT 1:A0
P4CR
PORT4 Control Register
12H (no RMW)
R/W 0 0 Input/Output P44C P43C W 0 0 0:Input 1:Output P44F P43F W 0 0 0:PORT 0:PORT 1:A4 1:A3
P4CR 0 1 1 0
P4FC 0 0 1 1
P47
P46
P45
P44
P43
P42
P41
P40
Input Port Output Port (Reserved) A7 to A0
92CD54I-302
2006-01-27
TMP92CD54I
Port7
Symbol P7 Name PORT7 Register ADDRESS 1CH 7 6 5 P75 0 4 P74 1 3 P73 2 P72 1 P71 0 P70 1 P70C 1 P70F 0 0:PORT 1:RD
R/W 1 1 1 Input/Output P75C P74C P73C P72C P71C PORT7 1EH W P7CR Control 0 1 1 0 1 Register (no RMW) 0:Input 1:Output P75F P74F P73F P72F P71F W PORT7 1FH 0 0 0 0 0 P7FC Function 0:PORT 0:PORT 0:PORT 0:PORT 0:PORT Register (no RMW) 1:WAIT 1:CS 1:SI2 1:WR Note1 SCL2 Note1: P72 SCL2, clock input/output at I2C mode, can be open-drain output by setting 1 to PNODE.
PortC
Symbol PC Name PORTC Register ADDRESS 30H 7 PCFC PORTC Function Register 33H (no RMW) 6 5 PC5 0 PC5C 0 PC5F 0 0:PORT INT4 1:TO7 4 PC4 0 PC4C 0 PC4F 0 0:PORT 1:TO5 3 PC3 2 PC2 1 PC1 0 PC1C 0 PC1F 0 0:PORT 1:TO1 0 PC0 0 PC0C 0 PC0F 0 0:PORT INT1 TI0
PCCR
PORTC Control Register
32H (no RMW)
R/W 0 0 Input/Output PC3C PC2C W 0 0 0:Input 1:Output PC3F PC2F W 0 0 0:PORT 0:PORT INT3 INT2 TI4 1:TO3
92CD54I-303
2006-01-27
TMP92CD54I
PortD
SYMBOL PD NAME PORTD Address 34H 7 PD7 0 PD7C 0 PD7F PORTD Function Register 37H (no RMW) 0 0:PORT WUINT7 1:TOB A23 6 PD6 0 PD6C 0 PD6F 0 0:PORT WUINT6 1:TOA A22 5 PD5 0 PD5C 0 PD5F 0 0:PORT TIB WUINT5 1:A21 4 PD4 3 PD3 2 PD2 0 PD2C 0 PD2F 0 0:PORT WUINT2 1:TO8 A18 1 PD1 0 PD1C 0 PD1F 0 0:PORT INT6 TI9 WUINT1 1:A17 0 PD0 0 PD0C 0 PD0F 0 0:PORT INT5 TI8 WUINT0 1:A16
PDCR
PORTD Control Register
36H (no RMW)
PDFC
R/W 0 0 Input/Output PD4C PD3C W 0 0 0:Input 1:Output PD4F PD3F W 0 0 0:PORT 0:PORT INT7 WUINT3 TIA 1:TO9 WUINT4 A19 1:A20
PDCR
PDFC
PD7 Input Port, WUINT7
PD6 Input Port, WUINT6
PD5 Input Port, TIB, WUINT5
PD4 Input Port, INT7, TIA, WUINT4 Output TIA, INT7, WUINT4 A20
PD3 Input Port, WUINT3 Port TO9 A19
PD2 Input Port, WUINT2
PD1 Input Port, INT6, TI9, WUINT1 TI9, INT6, WUINT1 A17
PD0 Input Port, INT5, TI8, WUINT0 TI8, INT5, WUINT0 A16
0
0
1 1 0
0 1 1 TOB A23 TOA A22 TIB, WUINT5 A21
TO8 A18
92CD54I-304
2006-01-27
TMP92CD54I
PortF
SYMBOL PF NAME PORTF Address 3CH 7 PF7 0 PF7C 0 PF7F PFFC PORTF Function Register 3FH (no RMW) 0 0:PORT 1:RX 6 PF6 0 PF6C 0 PF6F 0 0:PORT 1:TX 5 PF5 0 PF5C 0 PF5F 0 0:PORT CTS1 1:SCLK1 4 PF4 3 PF3 2 PF2 0 PF2C 0 PF2F 0 0:PORT CTS0 1:SCLK0 1 PF1 0 PF1C 0 PF1F 0 0:PORT 1:RXD0 0 PF0 0 PF0C 0 PF0F 0 0:PORT 1:TXD0
PFCR
PORTF Control Register
3EH (no RMW)
R/W 0 0 Input/Output PF4C PF3C W 0 0 0:Input 1:Output PF4F PF3F W 0 0 0:PORT 0:PORT 1:RXD1 1:TXD1
PFCR
PFFC
PF7 Input Port, RX
PF6
PF5 Input Port, SCLK1 (Input),
CTS1
PF4 Input Port, RXD1
PF3
PF2 Input Port, SCLK0 (Input),
CTS0
PF1 Input Port, RXD0
PF0
0
0
Input Port
Input Port
Input Port
1 1 0
0 1 1 RX RX TX TX SCLK1 (Output) Don't use this setting
Output Port RXD1 RXD1 TXD1 TXD1 (Open -Drain) SCLK0 (Output) Don't use this setting RXD0 RXD0 TXD0 TXD0 (Open -Drain)
PortG
Symbol PG Name PORTG Register ADDRESS 40H 7 PG7 6 PG6 5 PG5 4 PG4 R Input 3 PG3 2 PG2 1 PG1 0 PG0
PortL
Symbol PL Name PORTL Register ADDRESS 54H 7 6 5 4 3 PL3 2 PL2 R Input 1 PL1 0 PL0
92CD54I-305
2006-01-27
TMP92CD54I
PortM
SYMBOL PM NAME PORTM Address 58H 7 PORTM Open Drain Enable Register 59H 6 5 4 PM4 0 2 1 PM2 PM1 R/W 0 0 0 Input/Output ODEM3 ODEM2 ODEM1 R/W 0 0 0 PM3 PM2 PM1 Output Output Output 0:CMOS 0:CMOS 0:CMOS 1:Open 1:Open 1:Open Drain Drain Drain PM3C PM2C PM1C W 0 0 0 0:Input 1:Output PM3F PM2F PM1F W 0 0 0 0:PORT 0:PORT 0:PORT 1:SECLK 1:MISO 1:MOSI A11 A10 A9 3 PM3 0 PM0 0 -
PMODE
PMCR
PORTM Control Register
5AH (no RMW)
-
-
-
PM4C 0 PM4F 0 0:PORT 1:SCK2
PM0C 0 PM0F 0 0:PORT 1: SS A8
PMFC
PORTM Function Register
5BH (no RMW)
-
PMCR
PMFC
-
-
-
PM4 Input Port, SCK2 (Input) SCK2 (Output) Don't use this setting
PM3 Input Port
PM2 Input Port Output Port
PM1 Input Port
PM0 Input Port,
SS
0 1 1 0
0 0 1 1
-
-
-
-
-
-
SECLK A11
MISO A10
MOSI A9
SS
A8
92CD54I-306
2006-01-27
TMP92CD54I
PortN
SYMBOL PN NAME PORTN Address 5CH 7 ODE72 PORTN Open Drain Enable Register 6 PN6 0 ODEN6 R/W 5DH 0 0 0 0 P72 Output PN6 Output PN5 Output PN4 Output 0:CMOS 0:CMOS 0:CMOS 0:CMOS 1:Open 1:Open 1:Open 1:Open Drain Drain Drain Drain PN6C PN5C PN4C PORTN Function Register 5FH (no RMW) 0 PN6F W 0 0:PORT 1:SO2 SDA2 A15 0 PN5F 0 0:PORT SI1 1:SCL1 A14 5 PN5 0 ODEN5 3 2 PN3 PN2 R/W 0 0 0 Input/Output ODEN4 ODEN2 R/W 0 0 PN2 Output PN1 Output 0:CMOS 0:CMOS 1:Open 1:Open Drain Drain PN2C PN1C 0 PN1F 0 0:PORT 1:SO0 SDA0 4 PN4 1 PN1 0 ODEN1 0 PN0 0 -
PNODE
PNCR
PORTN Control Register
5EH (no RMW)
PNFC
PN3C W 0 0 0 0:Input 1:Output PN4F PN3F PN2F W 0 0 0 0:PORT 0:PORT 0:PORT 1:SO1 1:SCK1 SI0 SDA1 A12 1:SCL0 A13
PN0C 0 PN0F 0 0:PORT 1:SCK0
PNCR
PNFC
-
PN6 Input Port
PN5 Input Port, SI1
PN4
PN3
PN2 Input Port, SI0
PN1 Input Port
PN0 Input Port, SCK0 (Input)
0 1 1 0
0 0 1 1
-
SO2/SDA2 A15
SCL1 A14
Input Input Port, Port SCK1 (Input) Output Port SCK1 SO1/SDA1 (Output) A13 A12
SCL0
SCK0 (Output) Don't use this setting. SO0/SDA0
*To switch P72-output from push-pull type to Open-drain type, set 1 to PNODE.
92CD54I-307
2006-01-27
TMP92CD54I (2) 8-bit Timer 8-Bit Timer 01,23,45,67
Symbol Name ADDRESS 7 T0RDE R/W 0 Double Buffer 0:Disable 1:Enable 6 5 4 3 I2T01 R/W 0 IDLE2 0:Stop 1:Operate 1 0 T1RUN T0RUN R/W 0 0 0 8bit Timer Run/Stop Control 0:Stop & Clear 1:Run (Count up) 2 T01PRUN
TRUN01
8bit Timer01 Run Register
80H
TREG0
8Bit Timer Register 0 8Bit Timer Register 1
82H
(no RMW)
TREG1
83H
(no RMW)
T01M1 8Bit Timer0,1 Source CLK & MODE Register
T01M0
PWM01 0 PWM cycle 00:reserved 01:26 10:27 11:28 -
TMOD01
84H
0 0 Operate mode 00:8bit Timer 01:16bit Timer 10:8bit PPG 11:8bit PWM -
TFFCR1
Timer1 Flip-Flop Control Register
85H
(no RMW)
TRUN23
8bit Timer23 Run Register
88H
T2RDE R/W 0 Double Buffer 0:Disable 1:Enable
-
-
W Undefined W Undefined PWM00 T1CLK1 T1CLK0 T0CLK1 T0CLK0 R/W 0 0 0 0 0 Timer1 source clock Timer0 source clock 00:T0TRG 00:TI0 01:T1 01:T1 10:T16 10:T4 11:T256 11:T16 TFF1C1 TFF1C0 TFF1IE TFF1IS R/W R/W 1 1 0 0 TFF1 00:Invert TFF1 TFF1 Invert 01:Set TFF1 Invert 10:Clear TFF1 0:Disable 0:Timer0 1:Enable 1:Timer1 11:Don't care I2T23 T23PRUN T3RUN T2RUN R/W R/W 0 0 0 0 IDLE2 8bit Timer Run/Stop Control 0:Stop 0:Stop & Clear 1:Operate 1:Run (Count up) W Undefined W Undefined PWM20 T3CLK1 T3CLK0 R/W 0 0 0 Timer3 source clock 00:T2TRG 01:T1 10:T16 11:T256
TREG2
8Bit Timer Register 2 8Bit Timer Register 3
8AH
(no RMW)
TREG3
8BH
(no RMW)
T23M1 8Bit Timer2,3 Source CLK & MODE Register
T23M0
PWM21 0 PWM cycle 00:reserved 01:26 10:27 11:28
T2CLK1
T2CLK0
TMOD23
8CH
0 0 Operate mode 00:8bit Timer 01:16bit Timer 10:8bit PPG 11:8bit PWM
0 0 Timer2 source clock 00:reserved 01:T1 10:T4 11:T16
92CD54I-308
2006-01-27
TMP92CD54I
Symbol Name ADDRESS 7 6 5 4 3 TFF3C1 2 TFF3C0 1 TFF3IE 0 TFF3IS
TFFCR3
Timer3 Flip-Flop Control Register
8DH
(no RMW)
TRUN45
8bit Timer45 Run Register
90H
T4RDE R/W 0 Double Buffer 0:Disable 1:Enable
-
-
-
R/W R/W 1 1 0 0 00:Invert TFF3 TFF3 TFF3 01:Set TFF3 Invert Invert 10:Clear TFF3 0:Disable 0:Timer2 11:Don't Care 1:Enable 1:Timer3 I2T45 T45PRUN T5RUN T4RUN R/W R/W 0 0 0 0 IDLE2 8bit Timer Run/Stop Control 0:Stop 0:Stop & Clear 1:Operate 1:Run (Count up)
TREG4
8Bit Timer Register 4 8Bit Timer Register 5
92H
(no RMW)
TREG5
93H
(no RMW)
T45M1 8Bit Timer4,5 Source CLK & MODE Register
T45M0
PWM41 0 PWM cycle 00:reserved 01:26 10:27 11:28 -
TMOD45
94H
0 0 Operate mode 00:8bit Timer 01:16bit Timer 10:8bit PPG 11:8bit PWM -
TFFCR5
Timer5 Flip-Flop Control Register
95H
(no RMW)
TRUN67
8bit Timer67 Run Register
98H
T6RDE R/W 0 Double Buffer 0:Disable 1:Enable
-
-
W Undefined W Undefined PWM40 T5CLK1 T5CLK0 T4CLK1 T4CLK0 R/W 0 0 0 0 0 Timer5 source clock Timer4 source clock 00:T4TRG 00:TI4 01:T1 01:T1 10:T16 10:T4 11:T256 11:T16 TFF5C1 TFF5C0 TFF5IE TFF5IS R/W R/W 1 1 0 0 00:Invert TFF5 TFF5 TFF5 01:Set TFF5 Invert Invert 10:Clear TFF5 0:Disable 0:Timer4 1:Enable 1:Timer5 11:Don't care I2T67 T67PRUN T7RUN T6RUN R/W R/W 0 0 0 0 IDLE2 8bit Timer Run/Stop Control 0:Stop 0:Stop & Clear 1:Operate 1:Run (Count up) W Undefined W Undefined
TREG6
8Bit Timer Register 6 8Bit Timer Register 7
9AH
(no RMW)
TREG7
9BH
(no RMW)
92CD54I-309
2006-01-27
TMP92CD54I
Symbol Name 8Bit Timer6,7 Source CLK & MODE Register ADDRESS 7 T67M1 6 T67M0 5 PWM61 0 PWM cycle 00:reserved 01:26 10:27 11:28 4 PWM60 R/W 9CH 0 0 Operate mode 00:8bit Timer 01:16bit Timer 10:8bit PPG 11:8bit PWM 0 0 0 Timer7 source clock 00:T6TRG 01:T1 10:T16 11:T256 TFF7C1 TFF7C0 R/W 1 1 00:Invert TFF7 01:Set TFF7 10:Clear TFF7 11:Don't Care 0 0 Timer6 source clock 00:reserved 01:T1 10:T4 11:T16 TFF7IE TFF7IS R/W 0 0 TFF7 TFF7 Invert Invert 0:Disable 0:Timer6 1:Enable 1:Timer7 3 T7CLK1 2 T7CLK0 1 T6CLK1 0 T6CLK0
TMOD67
-
TFFCR7
Timer7 Flip-Flop Control Register
9DH
(no RMW)
92CD54I-310
2006-01-27
TMP92CD54I (3)16-bit Timer 16-Bit Timer 8,A
Symbol Name ADDRESS 7 T8RDE R/W 0 Double Buffer 0:Disable 1:Enable CAP9T9 6 R/W 0 Fix to "0" 5 4 3 I2T8 R/W 0 IDLE2 0:Stop 1:Operate CAP89M0 2 1 0 T8PRUN T8RUN R/W R/W 0 0 16bit Timer Run/Stop Control 0:Stop & Clear 1:Run (Count up) T8CLE R/W 0 1:UC8 Clear Enable T8CLK1 T8CLK0
TRUN8
16bit Timer8 Run Register
A0H
EQ9T9 R/W
TMOD8
16bit Timer8 Source CLK & Mode Register
A2H
0 0 TFF9 invert trigger 0: Disable 1: Enable
CAP8IN W 1 0:Soft Capture 1:Don't care
CAP89M1
TFF9C1 16Bit Timer8 Flip-Flop Control Register 16Bit Timer Register Low 16Bit Timer Register High 16Bit Timer Register Low 16Bit Timer Register High W A3H
TFF9C0
TFFCR8
1 1 00:Invert TFF9 01:Set TFF9 10:Clear TFF9 11:Don't Care
0 0 Capture Timing 00:disable 01:TI8 TI9 10:TI8 TI8 11:TFF1 TFF1 CAP9T8 CAP8T8 EQ9T8 R/W 0 0 0 TFF8 invert trigger 0: Disable 1: Enable W Undefined W Undefined W Undefined W Undefined R Undefined R Undefined R Undefined R Undefined
EQ8T8 0
0 0 Source Clock 00:TI8 01:T1 10:T4 11:T16 TFF8C1 TFF8C0 W 1 1 00:Invert TFF8 01:Set TFF8 10:Clear TFF8 11:Don't Care
TREG8L
A8H 8
(no RMW)
TREG8H
A9H 8
(no RMW)
TREG9L
AAH 9
(no RMW)
TREG9H
ABH 9
(no RMW)
CAP8L
Capture Register 8 Low Capture Register 8 High Capture Register 9 Low Capture Register 9 High
ACH
CAP8H
ADH
CAP9L
AEH
CAP9H
AFH
92CD54I-311
2006-01-27
TMP92CD54I
Symbol Name ADDRESS 7 TARDE R/W 0 Double Buffer 0:Disable 1:Enable CAPBTB 6 R/W 0 Fix to "0" 5 4 3 I2TA R/W 0 IDLE2 0:Stop 1:Operate CAPABM0 2 1 0 TAPRUN TARUN R/W R/W 0 0 16bit Timer Run/Stop Control 0:Stop & Clear 1:Run (Count up) TACLE R/W 0 1:UCA Clear Enable TACLK1 TACLK0
TRUNA
16bit TimerA Run Register
B0H
EQBTB R/W
TMODA
16bit TimerA Source CLK & Mode Register
B2H
0 0 TFFB invert trigger 0: Disable 1: Enable
CAPAIN W 1 0:Soft Capture 1:Don't care
CAPABM1
TFFBC1 16Bit TimerA Flip-Flop Control Register 16Bit Timer Register Low 16Bit Timer Register High 16Bit Timer Register Low 16Bit Timer Register High W B3H
TFFBC0
TFFCRA
1 1 00:Invert TFFB 01:Set TFFB 10:Clear TFFB 11:Don't Care
0 0 Capture Timing 00:disable 01:TIA TIB 10:TIA TIA 11:TFF1 TFF1 CAPBTA CAPATA EQBTA R/W 0 0 0 TFFA invert trigger 0: Disable 1: Enable W Undefined W Undefined W Undefined W Undefined R Undefined R Undefined R Undefined R Undefined
EQATA 0
0 0 Source Clock 00:TIA 01:T1 10:T4 11:T16 TFFAC1 TFFAC0 W 1 1 00:Invert TFFA 01:Set TFFA 10:Clear TFFA 11:Don't Care
TREGAL
B8H A
(no RMW)
TREGAH
B9H A
(no RMW)
TREGBL
BAH B
(no RMW)
TREGBH
BBH B
(no RMW)
CAPAL
Capture Register A Low Capture Register A High Capture Register B Low Capture Register B High
BCH
CAPAH
BDH
CAPBL
BEH
CAPBH
BFH
92CD54I-312
2006-01-27
TMP92CD54I (4) Serial Channels
Symbol SC0BUF Name Serial Channel 0 Buffer Register ADDRESS C0H
(no RMW)
7 RB7 TB7
RB8 R SC0CR Serial Channel 0 Control Register
Undefined
C1H
Receive data bit 8
4 3 2 RB4 RB3 RB2 TB4 TB3 TB2 R(Receiving) / W(Transmission) Undefined EVEN PE OERR PERR FERR R/W R (Clear 0 after reading) 0 0 0 0 0 1:Error Parity Parity 0:Odd 0:Disable Overrun Parity Framing 1:Enable 1:Even
6 RB6 TB6
5 RB5 TB5
1 RB1 TB1
0 RB0 TB0
SCLKS R/W 0 0:SCLK0 1:SCLK0
IOC 0 0:Baud Rate
Generator
TB8 Serial Channel 0 Mode 0 Register
Undefined
CTSE 0 0:CTS Disable 1:CTS Enable
RXE 0 0:Receive
Disable
WU
SM1
SM0
SC1
1:SCLK0 Pin Input SC0
SC0MOD0
C2H
Transmis sion Data bit 8
1:Receive Enable
R/W 0 0 0 Wake up 00:I/O Interface Mode 0:Disable 01:7bit UART Mode 1:Enable 10:8bit UART Mode 11:9bit UART Mode
Serial Channel 0 Baud Rate Control Register Serial Channel 0 K setting Register 0 Fix to "0"
BR0ADDE 0 (16-K)/16 divided 0:Disable 1:Enable FDPX0 R/W 0 I/O Interface mode 1:Full duplex 0:Half duplex
BR0CK1 0 00:T0 01:T2 10:T8 11:T32 -
BR0CK0 0
BR0S3 R/W 0
BR0S2
0 0 00:TimerTOTRG 01:Baud Rate Generator 10:Internal clock 1 11:External clock (SCLK0 Input) BR0S1 BR0S0 0
BR0CR
C3H
0 0 Set the frequency divisor "N" 0 to F
C4H I2S0 R/W 0 IDLE2 0:Stop 1:Operate
-
BR0K3
BR0K2
BR0K1
BR0K0
BR0ADD
R/W 0 0 0 0 Set the frequency divisor "K" (1 to F) -
SC0MOD1
Serial Channel 0 Mode 1 Register
C5H
92CD54I-313
2006-01-27
TMP92CD54I
Symbol SC1BUF Name Serial Channel 1 Buffer Register ADDRESS C8H
(no RMW)
7 RB7 TB7
RB8 R SC1CR Serial Channel 1 Control Register
Undefined
C9H
Receive Data bit 8
4 3 2 RB4 RB3 RB2 TB4 TB3 TB2 R(Receiving) / W(Transmission) Undefined EVEN PE OERR PERR FERR R/W R (Clear 0 after reading) 0 0 0 0 0 Parity 1:Error Parity 0:Odd 0:Disable Overrun Parity Framing 1:Even 1:Enable
6 RB6 TB6
5 RB5 TB5
1 RB1 TB1
0 RB0 TB0
SCLKS
IOC
R/W 0 0 0:SCLK1 0:Baud 1:SCLK1 Rate
Generator
TB8 Serial Channel 1 Mode 0 Register
Undefined
CTSE 0 0:CTS Disable 1:CTS Enable
RXE 0 0:Receive
Disable
WU R/W 0 Wake up 0:Disable 1:Enable
SM1
SM0
SC1
1:SCLK1 Pin Input SC0
SC1MOD0
CAH
Transmis sion data bit 8
1:Receive Enable
0 0 00:I/O Interface Mode 01:7bit UART Mode 10:8bit UART Mode 11:9bit UART Mode
Serial Channel 1 Baud Rate Control Register Serial Channel 1 K setting Register 0 Fix to "0"
BR1ADDE 0 (16-K)/16 divided 0:Disable 1:Enable FDPX1 R/W 0 I/O Interface mode 1:Full duplex 0:Half duplex
BR1CK1 0 00:T0 01:T2 10:T8 11:T32 -
BR1CK0 0
BR1S3 R/W 0
BR1S2
0 0 00:TimerTOTRG 01:Baud Rate Generator 10:Internal clock 1 11:External clock (SCLK1 Input) BR1S1 BR1S0 0
BR1CR
CBH
0 0 Set the frequency divisor "N" 0 to F
CCH I2S1 R/W 0 IDLE2 0:Stop 1:Operate
-
BR1K3
BR1K2 R/W
BR1K1
BR1K0
BR1ADD
0 0 0 0 Set the frequency divisor "K" (1 to F) -
SC1MOD1
Serial Channel 1 Mode 1 Register
CDH
92CD54I-314
2006-01-27
TMP92CD54I (5) Serial Expansion Interface (SEI)
Symbol Name ADDRESS 7 MODE W 0 SEI0 MODF
Detection
6 SEE 0
SEI System
5 BOS 0 Bit Order
Select
4 MSTR 0 Master Select bit 0:Slave 1:Master MODF 0 MODF Flag (Master) 1:Error
3 CPOL R/W 0
Clock polarity selection See figure 3.11.2, 3.11.3
2 CPHA 1
Clock Phase Selection See figure 3.11.2, 3.11.3
1 SER1
0 SER0
SECR
SEI Control Register
60H
0:Enable 1:Disable
Enable 0:Stop 1:Run
bit 0:MSB 1:LSB SOVF R 0 SOVF Flag (Slave) 1:Error
SEF 0 SEI Transfer 0:busy or Stop 1:End SESR SEI Status Register 61H
WCOL 0 WCOL Flag 1:Error
-
-
-
WCOL 0 WCOL Flag 1:Error
SOVF 0 SOVF Flag (Slave) 1:Error
MODF R 0 MODF Flag (Master) 1:Error
TSRC 0 SEI Receive 1:End
TSTC 0 SEI Transfer 1:End
SED7 SEDR SEI Data Register 62H 0
SED6 0
SED5 0
SED4 R/W
SED3
SED2 0
1 1 SEI Transfer Rate Select 00:reserved 01:Divided by 2 10:Divided by 4 11:Divided by 16 TMSE R/W 0 SEI Mode Select 0:Compat ibility Mode 1:Micro DMA Mode TASM TMSE R/W 0 0 Auto SEI Mode Shift Select Enable 0:Compat (Master) ibility INTSEE0 Mode Mask 1:Micro (Slave) DMA Mode SED1 SED0 0 0
0 0 Transfer/Receive Data
92CD54I-315
2006-01-27
TMP92CD54I (6) Interrupt controller
Symbol Name INT0 & INTAD Enable Register INT1 & INT2 Enable Register INT3 & INT4 Enable Register INT5 & INT6 Enable Register INT7 Enable Register INTT0 & INTT1 Enable Register INTT2 & INTT3 Enable Register INTT4 & INTT5 Enable Register INTT6 & INTT7 Enable Register INTTR8 & INTTR9 Enable Register INTTRA & INTTRB Enable Register INTTO8 & INTTOA (Overflow) Enable Register ADDRESS 7 IADC R 0 I2C R 0 I4C R 0 I6C R 0 IT1C R 0 IT3C R 0 IT5C R 0 IT7C R 0 IT9C R 0 ITBC R 0 ITOAC R 0 5 INTAD IADM2 IADM1 R/W 0 0 INT2 I2M2 0 INT4 D1h I4M1 R/W 0 0 INT6(CAP9) I6M2 I6M1 R/W 0 0 I4M2 I4M0 0 I6M0 0 IT1M0 0 IT3M0 0 IT5M0 0 IT7M0 0 IT9M0 0 ITBM0 0 ITOAM0 0 I3C R 0 I5C R 0 I7C R 0 IT0C R 0 IT2C R 0 IT4C R 0 IT6C R 0 IT8C R 0 ITAC R 0 ITO8C R 0 I3M2 I2M1 R/W 0 6 4 IADM0 0 I2M0 0 3 IOC R 0 I1C R 0 2 INT0 IOM2 0 INT1 I1M2 0 INT3 I3M1 R/W 0 0 INT5(CAP8) I5M2 I5M1 R/W 0 0 INT7(CAPA) I7M2 I7M1 R/W 0 0 INTT0(Timer0) IT0M2 IT0M1 R/W 0 0 INTT2(Timer2) IT2M2 IT2M1 R/W 0 0 INTT4(Timer4) IT4M2 IT4M1 R/W 0 0 INTT6(Timer6) IT6M2 IT6M1 R/W 0 0 INTTR8(Timer8) IT8M2 IT8M1 R/W 0 0 INTTRA(TimerA) ITAM2 ITAM1 R/W 0 0 INTTO8 ITO8M2 ITO8M1 R/W 0 0 I3M0 0 I5M0 0 I7M0 0 IT0M0 0 IT2M0 0 IT4M0 0 IT6M0 0 IT8M0 0 ITAM0 0 ITO8M0 0 I1M1 R/W 0 I1M0 0 IOM1 R/W 0 IOM0 0 1 0
INTE0AD
F0h
INTE12
D0h
INTE34
INTE56
D2h
INTE7
D3h
INTET01
D4h
INTET23
D5h
INTET45
D6h
INTET67
D7h
INTET89
D8h
INTETAB
D9h
INTETO8A
DAh
INTT1(Timer1) IT1M2 IT1M1 R/W 0 0 INTT3(Timer3) IT3M2 IT3M1 R/W 0 0 INTT5(Timer5) IT5M2 IT5M1 R/W 0 0 INTT7(Timer7) IT7M2 IT7M1 R/W 0 0 INTTR9(Timer8) IT9M2 IT9M1 R/W 0 0 INTTRB(TimerA) ITBM2 ITBM1 R/W 0 0 INTTOA ITOAM2 ITOAM1 R/W 0 0
92CD54I-316
2006-01-27
TMP92CD54I
Symbol Name INTRX0 & INTTX0 Enable Register INTRX1 & INTTX1 Enable Register INTCR & INTCT Enable Register INTCG Enable Register INTSEM0 & INTSEE0 Enable Register INTSER0 & INTSET0 Enable Register ADDRESS 7 ITX0C R 0 ITX1C R 0 ICTC R 0 ISEE0C R 0 ISET0C R 0 INTSBE2 & INTSBS2 Enable Register INTSBE0 & INTSBS0 Enable Register INTSBE1 & INTSBS1 Enable Register ISBS0C R 0 ISBS0C R 0 ISBS1C R 0 MKI7 INTMK0 Interrupt Mask Control 0 E5h 1 0: Mask 1: Enable MKIT7 INTMK1 Interrupt Mask Control 1 E6h R/W 1 0: Mask 1: Enable 5 INTTX0 ITX0M2 ITX0M1 R/W 0 0 INTTX1 ITX1M2 ITX1M1 R/W 0 0 INTCT ICTM2 ICTM1 R/W 0 0 6 4 ITX0M0 0 ITX1M0 0 ICTM0 0 ISEE0M0 0 ISET0M0 0 ISBS0M0 0 ISBS0M0 0 ISBS1M0 0 MKI4 3 IRX0C R 0 IRX1C R 0 ICRC R 0 ICGC R 0 ISEM0C R 0 ISER0C R 0 IRTCC R 0 ISBE0C R 0 ISBE0C R 0 ISBE1C R 0 MKI3 1 INTRX0 IRX0M2 IRX0M1 R/W 0 0 INTRX1 IRX1M2 IRX1M1 R/W 0 0 INTCR ICRM2 ICRM1 R/W 0 0 INTCG ICGM2 ICGM1 R/W 0 0 INTSEM0 ISEM0M2 ISEM0M1 R/W 0 0 INTSER0 ISER0M2 ISER0M1 R/W 0 0 INTRTC IRTCM2 IRTCM1 R/W 0 0 INTSBE2 ISBE0M2 ISBE0M1 R/W 0 0 INTSBE0 ISBE0M2 ISBE0M1 R/W 0 0 INTSBE1 ISBE1M2 ISBE1M1 R/W 0 0 MKI2 1 0: Mask 1: Enable MKIT2 R/W 1 0: Mask 1: Enable MKI1 1 0: Mask 1: Enable MKIT1 R/W 1 0: Mask 1: Enable 2 0 IRX0M0 0 IRX1M0 0 ICRM0 0 ICGM0 0 ISEM0M0 0 ISER0M0 0 IRTCM0 0 ISBE0M0 0 ISBE0M0 0 ISBE1M0 0 MKI0 1 0: Mask 1: Enable MKIT0 R/W 1 0: Mask 1: Enable
INTES0
DBh
INTES1
DCh
INTECRT
DDh
INTECG
Deh
INTESEE0
DFh
INTESED0
E0h
INTSEE0 ISEE0M2 ISEE0M1 R/W 0 0 INTSET0 ISET0M2 ISET0M1 R/W 0 0 -
INTERTC
INTRTC Enable
E1h
INTESB2
E2h
INTESB0
E3h
INTESB1
E4h
INTSBS2 ISBS0M2 ISBS0M1 R/W 0 0 INTSBS0 ISBS0M2 ISBS0M1 R/W 0 0 INTSBS1 ISBS1M2 ISBS1M1 R/W 0 0 MKI6 1 0: Mask 1: Enable MKIT6 R/W 1 0: Mask 1: Enable MKI5 1 0: Mask 1: Enable MKIT5 R/W 1 0: Mask 1: Enable
R/W 1 1 0: Mask 0: Mask 1: Enable 1: Enable MKIT4 R/W 1 0: Mask 1: Enable MKIT3 R/W 1 0: Mask 1: Enable
92CD54I-317
2006-01-27
TMP92CD54I
Symbol Name Interrupt Mask Control 2 ADDRESS 7
-
6 MKIRTC R/W 1 0: Mask 1: Enable MKICG R/W 1 0: Mask 1: Enable
-
5 MKITDA R/W 1 0: Mask 1: Enable MKICT R/W 1 0: Mask 1: Enable
-
4 MKITD R/W 1 0: Mask 1: Enable MKICR R/W 1 0: Mask 1: Enable
-
3 MKITRB R/W 1 0: Mask 1: Enable MKITX1 R/W 1 0: Mask 1: Enable
MKISET0
2 MKITRA R/W 1 0: Mask 1: Enable MKIRX1 R/W 1 0: Mask 1: Enable
MKISER0
1 MKITR9 R/W 1 0: Mask 1: Enable MKITX0 R/W 1 0: Mask 1: Enable
MKISEE0
0 MKITR8 R/W 1 0: Mask 1: Enable MKIRX0 R/W 1 0: Mask 1: Enable
MKISEM0
INTMK2
E7h
-
-
INTMK3
Interrupt Mask Control 3
E8h
-
-
INTMK4
Interrupt Mask Control 4
E9h
-
-
-
-
R/W 1 0: Mask 1: Enable
MKISBE1
R/W 1 0: Mask 1: Enable
MKISBE1
R/W 1 0: Mask 1: Enable
MKISBS0
R/W 1 0: Mask 1: Enable
MKISBE0
INTMK5 Interrupt Mask Control 5 EAh -
WFLG7 Wake-up flag Control Register 0 WUINT7 0:Norequest
MKISBS2 R/W 1 0: Mask 1: Enable WFLG6 0 WUINT6 0:Norequest
MKISBE2 R/W 1 0: Mask 1: Enable WFLG5 0 WUINT5 0:Norequest
MKIAD R/W 1 0: Mask 1: Enable WFLG4 R 0 WUINT4 0:Norequest
R/W 1 0: Mask 1: Enable WFLG3 0 WUINT3 0:Norequest
R/W 1 0: Mask 1: Enable WFLG2 0 WUINT2 0:Norequest
R/W 1 0: Mask 1: Enable WFLG1 0 WUINT1 0:Norequest
R/W 1 0: Mask 1: Enable WFLG0 0 WUINT0 0:Norequest
WUPFLAG
ECh
1:request WMD7 0 WUINT7 EDh
1:request WMD6 0 WUINT6
1:request WMD5 0 WUINT5
WUPMOD
Wake-up Mode Control Register
1:request 1:request WMD4 WMD3 R/W 0 0 WUINT4 WUINT3
1:request WMD2 0 WUINT2
1:request WMD1 0 WUINT1
1:request WMD0 0 WUINT0
0:Falling 0:Falling 0:Falling 0:Falling 0:Falling 0:Falling 0:Falling 0:Falling & Rising & Rising & Rising & Rising & Rising & Rising & Rising & Rising Edge Edge Edge Edge Edge Edge Edge Edge 1:Falling 1:Falling 1:Falling 1:Falling 1:Falling 1:Falling 1:Falling 1:Falling or Rising or Rising or Rising or Rising or Rising or Rising or Rising or Rising Edge Edge Edge Edge Edge Edge Edge Edge
WED7 Wake-up Edge select Register 0 WUINT7
0:Falling Edge 1:Rising Edge
WED6 0 WUINT6
0:Falling Edge 1:Rising Edge
WED5 0 WUINT5
0:Falling Edge 1:Rising Edge
WED4 R/W 0 WUINT4
0:Falling Edge 1:Rising Edge
WED3 0 WUINT3
0:Falling Edge 1:Rising Edge
WED2 0 WUINT2
0:Falling Edge 1:Rising Edge
WED1 0 WUINT1
0:Falling Edge 1:Rising Edge
WED0 0 WUINT0
0:Falling Edge 1:Rising Edge
WUPEDGE
EEh
WMK7 WUPMASK Wake-up Mask Register EFh 0 WUINT7 0:Disable 1:Enable
WMK6 0 WUINT6 0:Disable 1:Enable
WMK5 0 WUINT5 0:Disable 1:Enable
WMK4 R/W 0 WUINT4 0:Disable 1:Enable
WMK3 0 WUINT3 0:Disable 1:Enable
WMK2 0 WUINT2 0:Disable 1:Enable
WMK1 0 WUINT1 0:Disable 1:Enable
WMK0 0 WUINT0 0:Disable 1:Enable
92CD54I-318
2006-01-27
TMP92CD54I
Symbol Name INTTC0 & INTTC1 Enable Register INTTC2 & INTTC3 Enable Register INTTC4 & INTTC5 Enable Register INTTC6 & INTTC7 Enable Register NMI & INTWD Enable Register ADDRESS 7 ITC1C R 0 ITC3C R 0 ITC5C R 0 ITC7C R 0 INMIC R 0 6 5 INTTC1(DMA1) ITC1M2 ITC1M1 R/W 0 0 INTTC3(DMA3) ITC3M2 ITC3M1 R/W 0 0 INTTC5(DMA5) ITC5M2 ITC5M1 R/W 0 0 INTTC7(DMA7) ITC7M2 ITC7M1 R/W 0 0 NMI 4 ITC1M0 0 ITC3M0 0 ITC5M0 0 ITC7M0 0 3 ITC0C R 0 ITC2C R 0 ITC4C R 0 ITC6C R 0 IWDC R 0 2 1 INTTC0(DMA0) ITC0M2 ITC0M1 R/W 0 0 INTTC2(DMA2) ITC2M2 ITC2M1 R/W 0 0 INTTC4(DMA4) ITC4M2 ITC4M1 R/W 0 0 INTTC6(DMA6) ITC6M2 ITC6M1 R/W 0 0 INTWD IOLE R/W F6h (no RMW) 0
0:INT0 edge mode 1:INT0 level mode
0 ITC0M0 0 ITC2M0 0 ITC4M0 0 ITC6M0 0 NMIREE 0
1:Operate even at NMI rise Edge
INTETC01
F1h
INTETC23
F2h
INTETC45
F3h
INTETC67
F4h
INTNMWDT
F7h
IIMC
Interrupt Input Mode Control Register
INTCLR
Interrupt Clear Control Register
F8h (no RMW) 0
0
0
-
-
0
0
0
W 0 0 Interrupt Vector
92CD54I-319
2006-01-27
TMP92CD54I (7) DMA controller
Symbol Name DMA0 Start Vector Register DMA1 Start Vector Register DMA2 Start Vector Register DMA3 Start Vector Register DMA4 Start Vector Register DMA5 Start Vector Register DMA6 Start Vector Register DMA7 Start Vector Register ADDRESS 100h
(no RMW)
7 -
6 DBST6 0 DREQ6 0
5 DMA0V5 0 DMA1V5 0 DMA2V5 0 DMA3V5 0 DMA4V5 0 DMA5V5 0 DMA6V5 0 DMA7V5 0 DBST5 0 DREQ5 0
4 DMA0V4 0 DMA1V4 0 DMA2V4 0 DMA3V4 0 DMA4V4 0 DMA5V4 0 DMA6V4 0
DMA0V
DMA1V
101h
(no RMW)
-
3 DMA0 Start DMA0V3 R/W 0 DMA1 Start DMA1V3 R/W 0 DMA2 Start DMA2V3 R/W 0 DMA3 Start DMA3V3 R/W 0 DMA4 Start DMA4V3 R/W 0 DMA5 Start DMA5V3 R/W 0 DMA6 Start DMA6V3 R/W
2 Vector DMA0V2 0 Vector DMA1V2 0 Vector DMA2V2 0 Vector DMA3V2 0 Vector DMA4V2 0 Vector DMA5V2 0 Vector DMA6V2 0 Vector DMA7V2 0 DBST2 0 DREQ2 0
1 DMA0V1 0 DMA1V1 0 DMA2V1 0 DMA3V1 0 DMA4V1 0 DMA5V1 0 DMA6V1 0 DMA7V1 0 DBST1 0 DREQ1 0
0 DMA0V0 0 DMA1V0 0 DMA2V0 0 DMA3V0 0 DMA4V0 0 DMA5V0 0 DMA6V0 0 DMA7V0 0 DBST0 0 DREQ0 0
DMA2V
102h
(no RMW)
-
DMA3V
103h
(no RMW)
-
DMA4V
104h
(no RMW)
-
DMA5V
105h
(no RMW)
-
DMA6V
106h
(no RMW)
-
DMA7V
107h
(no RMW)
-
DMAB
DMA Burst Register
108h
(no RMW)
DBST7 0
DMAR
DMA Request Register
109h (no RMW)
DREQ7 0
0 DMA7 Start DMA7V4 DMA7V3 R/W 0 0 DMA Burst DBST4 DBST3 R/W 0 0 DMA Request DREQ4 DREQ3 R/W 0 0
92CD54I-320
2006-01-27
TMP92CD54I (8) Control register
Symbol Name ADDRESS 7
HALTM1 R/W
6
HALTM0 1
5
-
4
R/W 0 Fixed to "0"
3
-
2
CLKOE 0 CLK Output Enable 0Not output 1Output I2WDT R/W 0 IDLE2 0:Stop 1:Operate
1
CLKM1 R/W
0
CLKM0
CLKMOD
Clock Mode Register
10AH
1 Stand by mode 00:IDLE3 mode 01:STOP mode 10:IDLE1 mode 11:IDLE2 mode WDTE 1 1:WDT Enable
0 0 00:fc output 01:(reserved) 10:2/5fc output 11:(reserved) RESCR 0
1:Reset connect internally WDT out to RESET pin
WDMOD
Watchdog Timer Mode Register
110H
WDTP1 R/W 0 00 : 216/fc 01 : 218/fc 10 : 220/fc 11 : 222/fc
WDTP0 0
-
DRVE 0 1:Drive pin in STOP mode
0 Fix to "0"
WDCR
Watchdog Timer Control Register
111H
W B1H : WDT Disable 4EH : WDT Clear
92CD54I-321
2006-01-27
TMP92CD54I (9) AD converter
Symbol Name ADDRESS 7
EOCF R 0 0 AD Conversion BUSY Flag 1:Busy
6
ADBF
5
0 Fix to "0"
4
0 Fix to "0"
3
ITM0 0 0: Every 1 time 1: Every 4 times
2
REPET R/W 0 Repeat mode 0:Single mode 1:Repeat mode ADCH2
1
SCAN 0 Scan mode 0:Fixed channel mode 1:Channel scan mode ADCH1 R/W 0
0
ADS 0 AD Conversion start 1:Start Always read as "0" ADCH0 0
ADMOD0
AD Mode Control Register 0
138H
AD Conversion End Flag 1:END
ADMOD1
AD Mode Control Register 1
139H
VREFON R/W 0 String resistance 0:OFF 1:ON ADR01
I2AD R/W 0 IDLE2 0:Stop 1:Operate
0 Fix to "0"
0 Fix to "0"
ADCH3
ADREG0L
ADREG0H
ADREG1L
ADREG1H
ADREG2L
ADREG2H
ADREG3L
ADREG3H
AD Result Register 0 Low AD Result Register 0 High AD Result Register 1 Low AD Result Register 1 High AD Result Register 2 Low AD Result Register 2 High AD Result Register 3 Low AD Result Register 3 High
120H
ADR00 R Undefined ADR08
ADR07
ADR06
0 0 Input channel 0000: AN0 AN0 1011: AN11 AN0AN1AN2 ... AN11 1100, 1101, 1110, 1111 : reserved R ADR04 ADR03
ADR0RF R 0 ADR02
ADR09
121H
ADR11 ADR10 R Undefined ADR19 ADR18 ADR17 -
ADR05 R Undefined ADR15 R Undefined
ADR14
ADR13
122H
ADR1RF R 0 ADR12
ADR16
123H
ADR21 ADR20 R Undefined ADR28 ADR27 -
ADR25 R Undefined
ADR24
ADR23
124H
ADR2RF R 0 ADR22
ADR29
ADR26
125H
ADR31 ADR30 R Undefined ADR38 ADR37 -
ADR35 R Undefined
ADR34
ADR33
126H
ADR3RF R 0 ADR32
ADR39
ADR36
127H
92CD54I-322
2006-01-27
TMP92CD54I
Symbol ADREG4L Name AD Result Register 4 Low AD Result Register 4 High AD Result Register 5 Low AD Result Register 5 High AD Result Register 6 Low AD Result Register 6 High AD Result Register 7 Low AD Result Register 7 High AD Result Register 8 Low AD Result Register 8 High AD Result Register 9 Low AD Result Register 9 High AD Result Register A Low AD Result Register A High AD Result Register B Low AD Result Register B High ADDRESS 128H 7
ADR41 R Undefined ADR49 ADR48
6
ADR40
5
ADR47
4
ADR46 R Undefined
3
ADR45
2
ADR44
1
ADR43
0
ADR4RF R 0 ADR42
ADREG4H
129H
ADR51 ADR50 R Undefined ADR58 ADR57 -
ADR55 R Undefined
ADR54
ADR53
ADREG5L
12AH
ADR5RF R 0 ADR52
ADR59
ADR56
ADREG5H
12BH
ADR61 ADR60 R Undefined ADR68 ADR67 -
ADR65 R Undefined
ADR64
ADR63
ADREG6L
12CH
ADR6RF R 0 ADR62
ADR69
ADR66
ADREG6H
12DH
ADR71 ADR70 R Undefined ADR78 ADR77 -
ADR75 R Undefined
ADR74
ADR73
ADREG7L
12EH
ADR7RF R 0 ADR72
ADR79
ADR76
ADREG7H
12FH
ADR81 ADR80 R Undefined ADR88 ADR87 -
ADR85 R Undefined
ADR84
ADR83
ADREG8L
130H
ADR8RF R 0 ADR82
ADR89
ADR86
ADREG8H
131H
ADR91 ADR90 R Undefined ADR98 ADR97 -
ADR95 R Undefined
ADR94
ADR93
ADREG9L
132H
ADR9RF R 0 ADR92
ADR99
ADR96
ADREG9H
133H
ADRA1 ADRA0 R Undefined ADRA8 ADRA7 -
ADRA5 R Undefined
ADRA4
ADRA3
ADREGAL
134H
ADRARF R 0 ADRA2
ADRA9
ADRA6
ADREGAH
135H
ADRB1 ADRB0 R Undefined ADRB8 ADRB7 -
ADRB5 R Undefined
ADRB4
ADRB3
ADREGBL
136H
ADRBRF R 0 ADRB2
ADRB9
ADRB6
ADREGBH
137H
92CD54I-323
2006-01-27
TMP92CD54I
(10) Memory controller
Symbol Name BLOCK CS/WAIT Control Register Low ADDRESS 5 4 3 2 1 0 BWW1 BWW0 BWR2 BWR1 BWR0 W W 0 1 0 0 1 0 Number of write waits Number of read waits 001:0wait 010:1wait 011:Nwait 001:0wait 010:1wait 011:Nwait 101:2wait 110:3wait 101:2wait 110:3wait others : reserved others : reserved BE BM BOM1 BOM0 BBUS1 BBUS0 W W W W 1 0 0 0 0 0 0 0 CS select 0:16MB Fix to "0" Fix to "0" 00:SRAM/ROM 00:8bit 0:Disable 1:Sets 01,10,11:Resetved 01,10,11:reserved 1:Enable area MV22 MV21 MV20 MV19 MV18 MV17 MV16 MV15 R/W 1 1 1 1 1 1 1 1 0:Compare enable 1:Compare disable MS23 MS22 MS21 MS20 MS19 MS18 MS17 MS16 R/W 1 1 1 1 1 1 1 1 Set start address A23 to A16 R/W 0 0 0 0 0 0 0 0 C9H: Auto Chip Erase & Unprotect command Enable Code Others: Auto Chip Erase & Unprotect command Disable Code RAMSTB RAM Write Control Register R/W 0 *note1
0:lost data
or Power on reset 1:kept data
7 -
6 BWW2
BCSL
148H
BCSH
BLOCK CS/WAIT Control Register High Memory Address Mask Register Memory Start Address Register Flash Security Write Enable Register
149H
MAMR
14AH
MSAR
14BH
*note2
FSWE
16BH
RAMWI 1
-
-
-
-
-
-
RAMCR
16DH
RAM write 0:Disable 1:Enable
*note2
FLSR
Flash Status Register
16FH
R/W 0 Note) Set to 0.
R/W 0 Note) Set to 0.
R/W 0 Note) Set to 0.
R/W 0 Note) Set to 0.
-
R/BSY R 1
Ready /Busy flag 0:Busy
(auto operation in progress)
-
-
1:Ready
(auto operation finished)
Note1: After power-on reset. Warm reset does not change this bit. Note2: Only TMP92FD54AI.
92CD54I-324
2006-01-27
TMP92CD54I
(11) Serial Bus Interface (SBI)
Symbol Name 6 5 BC1 BC0 W 170H 0 0 0 (no RMW) Number of transfer bits I2C mode 000:8 001:1 010:2 011:3 100:4 101:5 110:6 111:7 SIOS 0 SIOINH W
Transfer (no RMW) 0:Stop SIO mode 1:Start
ADDRESS
7 BC2
4 ACK R/W 0
Acknowledge mode
SBI0CR1
SBI0 Control Register 1 170H
0:Disable 1:Enable
SIOM1
SIOM0
0
Transfer 0:Continue 1:Abort
SBI0DBR
SBI0 Buffer Register
171H
(no RMW)
RB7/TB7
RB6/TB6
SA6 I2CBUS0 Address Register 172H
(no RMW)
SA5 0
I2C0AR
0
0 0 Transfer mode 00:8bit transmit 10:8bit transmit/receive 11:8bit receive RB5/TB5 RB4/TB4 RB3/TB3 RB2/TB2 R(Receiving)/W(Transmission) Undefine SA4 SA3 SA2 SA1 W 0 0 0 0 Setting Slave Address
2 1 0 SWRMON/SCK0 SCK2 SCK1 W R/W 1 0 0 1/0 Setting of the divide value "n"/fast/standard 0001:- 0010: - 0011:8 0100:9 0101:10 0110:11 1000:fast 1111:standard other:reserved SCK2 SCK1 SCK0 W W 1 0 0 0 Note) Setting of the divide value "n" Write 0 to 000:4 001:5 010:6 011:7 this bit in 100:8 101:9 110:10 SIO mode. 111:external clock SCK0 RB1/TB1 RB0/TB0
3 SCK3
SA0 0
ALS 0
Address recognition
0:Enable 1:Disable
MST 173H 0
TRX 0
0:Receive 1:Transmit
BB 0
Start/stop generation 0:Stop 1:Start
PIN W 1
INTSBE0 interrupt 0:Request 1:Cancel
SBIM1 0
SBIM0 0
SWRST1 0
SWRST0 0
(no RMW) 0:Slave I2C mode 1:Master
SBI0CR2
SBI0 Control Register 2 173H
(no RMW) SIO mode
Operation mode selection Software reset generate 00:Port mode 10:I2C mode write "10" and "01", then an 01:SIO mode 11:reserved internal reset signal is generated.
-
-
-
-
SBIM1 W 0
SBIM0 0
Operation mode selection 00:Port mode 10:I2C mode 01:SIO mode 11:reserved
W W 0 0 Fix to "00"
MST 173H 0
TRX 0
0:Receive 1:transmit
BB 0
Bus status Monitor 0:Free 1:Busy
PIN R 1
INTSBE0 interrupt 0:request 1:Cancel
AL 0
Arbitration lost detection monitor 1:Detect
AAS 0
AD0 0
LRB 0
Last receive bit monitor 0: "0" 1: "1"
(no RMW) 0:Slave I2C mode 1:Master
SBI0SR
SBI0 Status Register 173H
(no RMW) SIO mode
Slave address General call match detection detection 1:Detect monitor 1:Detect
-
-
-
-
SIOF R 0
SEF 0
-
-
Transfer Shift status status 0:Stopped 0:Stopped 1:In progress 1:In progress
92CD54I-325
2006-01-27
TMP92CD54I
Symbol Name 6 BC1 W 178H 0 0 (no RMW) Number of transfer bits I2C mode 000:8 001:1 010:2 011:3 101:5 110:6 111:7 SIOS 0 SIOINH W
Transfer (no RMW) SIO mode 0:Stop 1:Start
ADDRESS
7 BC2
5 BC0 0 100:4
4 ACK R/W 0
Acknowledge mode
SBI1CR1
SBI1 Control Register 1 178H
0:Disable 1:Enable
SIOM1
SIOM0
0
Transfer 0:Continue 1:Abort
SBI1DBR
SBI1 Buffer Register
179H
(no RMW)
RB7/TB7
RB6/TB6
SA6 I2CBUS1 Address Register 17AH
(no RMW)
SA5 0
I2C1AR
0
0 0 Transfer mode 00:8bit transmit 10:8bit transmit/receive 11:8bit receive RB5/TB5 RB4/TB4 RB3/TB3 RB2/TB2 R(Receiving)/W(Transmission) Undefine SA4 SA3 SA2 SA1 W 0 0 0 0 Setting Slave Address
2 1 0 SWRMON/SCK0 SCK2 SCK1 W R/W 1 0 0 1/0 Setting of the divide value "n"/fast/standard 0001:- 0010:- 0011:8 0100:9 0101:10 0110:11 1000:fast 1111:standard other:reserved SCK2 SCK1 SCK0 W W 1 0 0 0 Note) Setting of the divide value "n" Write 0 to 000:4 001:5 010:6 011:7 this bit in 100:8 101:9 110:10 SIO mode. 111:external clock SCK1 RB1/TB1 RB0/TB0
3 SCK3
SA0 0
ALS 0
Address recognition
0:Enable 1:Disable
MST 17BH 0
TRX 0
0:Receive 1:Transmit
BB 0
Start/stop generation 0:Stop 1:Start
PIN W 1
INTSBE1 interrupt 0:Request 1:Cancel
SBIM1 0
SBIM0 0
SWRST1 0
SWRST0 0
(no RMW) 0:Slave I2C mode 1:Master
SBI1CR2
SBI1 Control Register 2 17BH
(no RMW) SIO mode
Operation mode selection Software reset generate 00:Port mode 10:I2C mode write "10" and "01", then an 01:SIO mode 11:reserved internal reset signal is generated.
-
-
-
-
SBIM1 W 0
SBIM0 0
Operation mode selection 00:Port mode 10:I2C mode 01:SIO mode 11:reserved
W W 0 0 Fix to "00"
MST 17BH 0
TRX 0
0:Receive 1:transmit
BB 0
Bus status monitor 0:Free 1:Busy
PIN R 1
INTSBE1 interrupt 0:request 1:Cancel
AL 0
Arbitration lost detection monitor 1:Detect
AAS 0
AD0 0
LRB 0
Last receive bit monitor 0: "0" 1: "1"
(no RMW) 0:Slave I2C mode 1:Master
SBI1SR
SBI1 Status Register 17BH
(no RMW) SIO mode
Slave address General call match detection detection 1:Detect monitor 1:Detect
-
-
-
-
SIOF R 0
SEF 0
-
-
Transfer Shift status status 0:Stopped 0:Stopped 1:In progress 1:In progress
92CD54I-326
2006-01-27
TMP92CD54I
Symbol Name 6 BC1 W 180H 0 0 (no RMW) Number of transfer bits I2C mode 000:8 001:1 010:2 011:3 101:5 110:6 111:7 SIOS 0 SIOINH W
Transfer (no RMW) SIO mode 0:Stop 1:Start
ADDRESS
7 BC2
5 BC0 0 100:4
4 ACK R/W 0
Acknowledge mode
SBI2CR1
SBI2 Control Register 1 180H
0:Disable 1:Enable
SIOM1
SIOM0
0
Transfer 0:Continue 1:Abort
SBI2DBR
SBI2 Buffer Register
181H
(no RMW)
RB7/TB7
RB6/TB6
SA6 I2CBUS2 Address Register 182H
(no RMW)
SA5 0
I2C2AR
0
0 0 Transfer mode 00:8bit transmit 10:8bit transmit/receive 11:8bit receive RB5/TB5 RB4/TB4 RB3/TB3 RB2/TB2 R(Receiving)/W(Transmission) Undefine SA4 SA3 SA2 SA1 W 0 0 0 0 Setting Slave Address
2 1 0 SWRMON/SCK0 SCK2 SCK1 W R/W 1 0 0 1/0 Setting of the divide value "n"/fast/standard 0001:- 0010:- 0011:8 0100:9 0101:10 0110:11 1000:fast 1111:standard other:reserved SCK2 SCK1 SCK0 W W 1 0 0 0 Note) Setting of the divide value "n" Write 0 to 000:4 001:5 010:6 011:7 this bit in 100:8 101:9 110:10 SIO mode. 111:external clock SCK2 RB1/TB1 RB0/TB0
3 SCK3
SA0 0
ALS 0
Address recognition
0:Enable 1:Disable
MST 183H 0
TRX 0
0:Receive 1:Transmit
BB 0
Start/stop generation 0:Stop 1:Start
PIN W 1
INTSBE1 interrupt 0:Request 1:Cancel
SBIM1 0
SBIM0 0
SWRST1 0
SWRST0 0
(no RMW) 0:Slave I2C mode 1:Master
SBI2CR2
SBI2 Control Register 2 183H
(no RMW) SIO mode
Operation mode selection Software reset generate 00:Port mode 10:I2C mode write "10" and "01", then an 01:SIO mode 11:reserved internal reset signal is generated.
-
-
-
-
SBIM1 W 0
SBIM0 0
Operation mode selection 00:Port mode 10:I2C mode 01:SIO mode 11:reserved
W W 0 0 Fix to "00"
MST 183H 0
TRX 0
0:Receive 1:transmit
BB 0
Bus status monitor 0:Free 1:Busy
PIN R 1
INTSBE1 interrupt 0:request 1:Cancel
AL 0
Arbitration lost detection monitor 1:Detect
AAS 0
AD0 0
LRB 0
Last receive bit monitor 0: "0" 1: "1"
(no RMW) 0:Slave I2C mode 1:Master
SBI2SR
SBI2 Status Register 183H
(no RMW) SIO mode
Slave address General call match detection detection 1:Detect monitor 1:Detect
-
-
-
-
SIOF R 0
SEF 0
-
-
Transfer Shift status status 0:Stopped 0:Stopped 1:In progress 1:In progress
92CD54I-327
2006-01-27
TMP92CD54I
Symbol Name SBI0 Baud rate Register 0 ADDRESS 7 6 I2SBI0 W R/W 0 0 Fix to "0" IDLE2
0:Abort 1:Operate
5 -
4 -
3 -
2 -
1 -
0 -
SBI0BR0
174H
SBI0BR1
SBI0 Baud rate Register 1
175H
P4EN R/W 0
Clock control 0:Abort 1:Operate
-
-
-
-
-
-
-
SBI1BR0
SBI1 Baud rate Register 0
17CH
I2SBI0 W R/W 0 0 Fix to "0" IDLE2
0:Abort 1:Operate
-
-
-
-
-
-
SBI1BR1
SBI1 Baud rate Register 1
17DH
P4EN R/W 0
Clock control 0:Abort 1:Operate
-
-
-
-
-
-
-
SBI2BR0
SBI2 Baud rate Register 0
184H
I2SBI0 W R/W 0 0 Fix to "0" IDLE2
0:Abort 1:Operate
-
-
-
-
-
-
SBI2BR1
SBI2 Baud rate Register 1
185H
P4EN R/W 0
Clock control 0:Abort 1:Operate
-
-
-
-
-
-
-
92CD54I-328
2006-01-27
TMP92CD54I
(12) CAN controller (1/5)
Symbol MBnMI0L Name Message Identifier 0L Message Identifier 0H Message Identifier 1L Message Identifier 1H Message Control Field L Message Control Field H Data 0
(no RMW) MBn* + 07H
ADDRESS
MBn* + 00H (no RMW) MBn* + 01H (no RMW) MBn* + 02H (no RMW) MBn* + 03H (no RMW) MBn* + 04H (no RMW) MBn* + 05H (no RMW) MBn* + 06H
7 ID23 IDE ID7 ID15 D07 D17 D27 D37 D47 D57 D67 D77 TSV7 -
6 ID22 GAME ID6 ID14 D06 D16 D26 D36 D46 D56 D66 D76 TSV6 TSV14 -
5 ID21 RFH ID5 ID13 D05 D15 D25 D35 D45 D55 D65 D75 TSV5 TSV13 -
4 ID20 R/W ID28 R/W ID4 R/W ID12 R/W RTR D04 R/W D14 R/W D24 R/W D34 R/W D44 R/W D54 R/W D64 R/W D74 R/W TSV4 R TSV12 R -
3 ID19 ID27 ID3 ID11 DLC3 D03 D13 D23 D33 D43 D53 D63 D73 TSV3 TSV11 -
2 ID18 ID26 ID2 ID10 DLC2 R/W D02 D12 D22 D32 D42 D52 D62 D72 TSV2 TSV10 -
1 ID17 ID25 ID1 ID9 DLC1 D01 D11 D21 D31 D41 D51 D61 D71 TSV1 TSV9 -
0 ID16 ID24 ID0 ID8 DLC0 D00 D10 D20 D30 D40 D50 D60 D70 TSV0 TSV8 -
MBnMI0H
MBnMI1L
MBnMI1H
MBnMCFL
MBnMCFH
MBnD0
MBnD1
Data 1
(no RMW) MBn* + 08H
MBnD2
Data 2
(no RMW) MBn* + 09H
MBnD3
Data 3
(no RMW) MBn* + 0AH
MBnD4
Data 4
(no RMW) MBn* + 0BH
MBnD5
Data 5
(no RMW) MBn* + 0CH
MBnD6
Data 6
(no RMW) MBn* + 0DH
MBnD7
Data 7
(no RMW) MBn* + 0EH
MBnTSVL
Time Stamp Value L Time Stamp Value H
MBn* + 0FH
TSV15 -
MBnTSVH
* MBn = 200H + n x 10H, n = 0, 1, 2, 3, ... , 15
92CD54I-329
2006-01-27
TMP92CD54I
CAN controller (2/5)
Symbol MCL Name
Mailbox Configuration Register L Mailbox Configuration Register H
ADDRESS 300H
7 MC7 0 MC15
6 MC6 0 MC14 0 MD6 0 MD14 0 TRS6 0 TRS14 0 TRR6 0 TRR14 0 TA6 0 TA14 0 AA6 0 AA14 0 RMP6 0 RMP14 0 RML6 0 RML14 0
5 MC5 0 MC13 0 MD5 0 MD13 0 TRS5 0 TRS13 0 TRR5 0 TRR13 0 TA5 0 TA13 0 AA5 0 AA13 0 RMP5 0 RMP13 0 RML5 0 RML13 0
4 MC4 R/W 0 MC12 R/W 0 MD4 R/W 0 MD12 0 TRS4 R/S 0 TRS12 0 TRR4 R/S 0 TRR12 0 TA4 R/C 0 TA12 0 AA4 R/C 0 AA12 0 RMP4 R/C 0 RMP12 R/C 0 RML4 R/C 0 RML12 R/C 0
3 MC3 0 MC11 0 MD3 0 MD11 R/W 0 TRS3 0 TRS11 R/S 0 TRR3 0 TRR11 R/S 0 TA3 0 TA11 R/C 0 AA3 0 AA11 R/C 0 RMP3 0 RMP11 0 RML3 0 RML11 0
2 MC2 0 MC10 0 MD2 0 MD10 0 TRS2 0 TRS10 0 TRR2 0 TRR10 0 TA2 0 TA10 0 AA2 0 AA10 0 RMP2 0 RMP10 0 RML2 0 RML10 0
1 MC1 0 MC9 0 MD1 0 MD9 0 TRS1 0 TRS9 0 TRR1 0 TRR9 0 TA1 0 TA9 0 AA1 0 AA9 0 RMP1 0 RMP9 0 RML1 0 RML9 0
0 MC0 0 MC8 0 MD0 0 MD8 0 TRS0 0 TRS8 0 TRR0 0 TRR8 0 TA0 0 TA8 0 AA0 0 AA8 0 RMP0 0 RMP8 0 RML0 0 RML8 0
MCH
301H 0 MD7 302H 0 303H MD15 R 1 TRS7 0 TRR7 0 TA7 0 AA7 0 RMP7 0 RMP15 0 RML7 0 RML15 0
MDL
Mailbox Direction Register L Mailbox Direction Register H
Transmission Request Set Register L Transmission Request Set Register H Transmission Request Reset Register L Transmission Request Reset Register H Transmission Acknowledge Register L Transmission Acknowledge Register H Abort Acknowledge Register L Abort Acknowledge Register H Receive Message Pending Register L Receive Message Pending Register H Receive Message Lost Register L Receive Message Lost Register H
MDH
TRSL
304H
(no RMW)
TRSH
305H
(no RMW)
TRRL
306H
(no RMW)
TRRH
307H
(no RMW)
TAL
308H
(no RMW)
TAH
309H
(no RMW)
AAL
30AH
(no RMW)
AAH
30BH
(no RMW)
RMPL
30CH
(no RMW)
RMPH
30DH
(no RMW)
RMLL
30EH
(no RMW)
RMLH
30FH
(no RMW)
92CD54I-330
2006-01-27
TMP92CD54I
CAN controller (3/5)
Symbol LAM0L Name
Local Acceptance Mask Register 0L Local Acceptance Mask Register 0H Local Acceptance Mask Register 1L Local Acceptance Mask Register 1H Global Acceptance Mask Register 0L Global Acceptance Mask Register 0H Global Acceptance Mask Register 1L Global Acceptance Mask Register 1H Master Control Register L
ADDRESS 310H
7 LAM23 0
6 LAM22 0 LAM6 0 LAM14 0 GAM22 0 GAM6 0 GAM14 0 SMR 0 SMA R 0
5 LAM21 0 LAM5 0 LAM13 0 GAM21 0 GAM5 0 GAM13 0 HMR R/W 0 HMA 0 R
4 LAM20 R/W 0 LAM28 0 LAM4 R/W 0 LAM12 R/W 0 GAM20 R/W 0 GAM28 0 GAM4 R/W 0 GAM12 R/W 0 WUBA 0 -
3 LAM19 0 LAM27 0 LAM3 0 LAM11 0 GAM19 0 GAM27 0 GAM3 0 GAM11 0 MTOS 0 TSO 0 RM
2 LAM18 0 LAM26 R/W 0 LAM2 0 LAM10 0 GAM18 0 GAM26 R/W 0 GAM2 0 GAM10 0 BO R 0 TM 0 BRP2 0 TSEG12 0 -
1 LAM17 0 LAM25 0 LAM1 0 LAM9 0 GAM17 0 GAM25 0 GAM1 0 GAM9 0 TSCC W 0 TSTLB R/W 0 EP 0 BRP1 0 TSEG11 0 SJW1 R/W 0
0 LAM16 0 LAM24 0 LAM0 0 LAM8 0 GAM16 0 GAM24 0 GAM0 0 GAM8 0 SRES 0 TSTERR 0 EW 0 BRP0 0 TSEG10 0 SJW0 0
LAM0H
311H
LAMI R/W 0 LAM7
LAM1L
312H 0 LAM15 313H 0 GAM23 314H 0 315H GAMI R/W 0 GAM7 316H 0 GAM15 317H 0 CCR 318H 1 319H CCE 31AH 1
LAM1H
GAM0L
GAM0H
GAM1L
GAM1H
MCRL
MCRH
Master Control Register H
GSRL
Global Status Register L
GSRH
Global Status Register H
MsgInSlot<3:0> 31BH 1 1 BRP6 0 TSEG22 0 1 BRP5 0 TSEG21 0 BRP7 31CH 0 31DH SAM 31EH 0 31FH 0 TSEG20 R/W 0 1 BRP4 R/W
0 BRP3 0 TSEG13 0 -
BCR1L
Bit Configuration Register 1L Bit Configuration Register 1H Bit Configuration Register 2L Bit Configuration Register 2H
BCR1H
BCR2L
BCR2H
92CD54I-331
2006-01-27
TMP92CD54I
CAN controller (4/5)
Symbol GIFL Name
Global Interrupt Flag L Global Interrupt Flag H Global Interrupt Mask L Global Interrupt Mask H Mailbox Transmit Int. Flag L Mailbox Transmit Int. Flag H Mailbox Receive Int. Flag L Mailbox Receive Int. Flag H Mailbox Interrupt Flag L Mailbox Interrupt Flag H Change Data Request Register L Change Data Request Register H Remote Frame Pending Register L Remote Frame Pending Register H
ADDRESS
320H (no RMW)
7 RFPF 0
6 WUIF 0 WUIM 0 MBTIF6 0 MBTIF14 0 MBRIF6 0 MBRIF14 0 MBIM6 0 MBIM14 0 CDR6 0 CDR14 0 RFP6 0 RFP14 REC6 0 TEC6 0
5 RMLIF 0 RMLIM 0 MBTIF5 0 MBTIF13 0 MBRIF5 0 MBRIF13 0 MBIM5 0 MBIM13 0 CDR5 0 CDR13 0 RFP5 0 RFP13 REC5 0 TEC5 0
4 TRMABF R/C 0 TRMABM R/W 0 MBTIF4 R/C 0 MBTIF12 0 MBRIF4 R/C 0 MBRIF12 R/C 0 MBIM4 R/W 0 MBIM12 R/W 0 CDR4 R/W 0 CDR12 0 RFP4 R/C 0 RFP12 R/C REC4 R/W 0 TEC4 R/W 0
3 TSOIF 0 TSOIM 0 MBTIF3 0 MBTIF11 R/C 0 MBRIF3 0 MBRIF11 0 MBIM3 0 MBIM11 0 CDR3 0 CDR11 R/W 0 RFP3 0 RFP11 REC3 0 TEC3 0
2 BOIF 0 BOIM 0 MBTIF2 0 MBTIF10 0 MBRIF2 0 MBRIF10 0 MBIM2 0 MBIM10 0 CDR2 0 CDR10 0 RFP2 0 RFP10 REC2 0 TEC2 0
1 EPIF 0 EPIM 0 MBTIF1 0 MBTIF9 0 MBRIF1 0 MBRIF9 0 MBIM1 0 MBIM9 0 CDR1 0 CDR9 0 RFP1 0 RFP9 REC1 0 TEC1 0
0 WLIF 0 WLIM 0 MBTIF0 0 MBTIF8 0 MBRIF0 0 MBRIF8 0 MBIM0 0 MBIM8 0 CDR0 0 CDR8 0 RFP0 0 RFP8 REC0 0 TEC0 0
GIFH
321H (no RMW)
RFPM
GIML
322H
0 323H
GIMH
324H (no RMW)
MBTIF7 0
MBTIFL
MBTIFH
325H (no RMW)
MBRIF7 0 MBRIF15 0 MBIM7
MBRIFL
326H (no RMW)
MBRIFH
327H (no RMW)
MBIML
328H
0 MBIM15
329H
MBIMH
0 CDR7
32AH
CDRL
0 32BH
CDRH
32CH (no RMW)
RFP7 0
RFPL
RFPH
32DH (no RMW)
RFP15 -
CECL
CAN Error Counter L
32EH (no RMW)
REC7 0 TEC7 0
CECH
CAN Error Counter H
32FH (no RMW)
92CD54I-332
2006-01-27
TMP92CD54I
CAN controller (5/5)
Symbol TSPL Name
Time Stamp Prescaler L
ADDRESS
330H
7 -
6 TSC6 0 TSC14 0
5 TSC5 0 TSC13 0
4 TSC4 R/W 0 TSC12 R/W 0
3 TSP3 0 TSC3 0 TSC11 0
2 TSP2 R/W 0 TSC2 0 TSC10 0
1 TSP1 0 TSC1 0 TSC9 0
0 TSP0 0 TSC0 0 TSC8 0
TSPH
Time Stamp Prescaler H
331H
TSCL
Time Stamp Counter L
332H (no RMW)
TSC7 0 TSC15 0
TSCH
Time Stamp Counter H
333H (no RMW)
92CD54I-333
2006-01-27
TMP92CD54I
(13)
Symbol
RTC control
Name ADDRESS 7 R/W 0
Write to "0"
6 -
5 -
4 -
3 RTCSEL2 0
1x0: 216/fs 1x1: 215/fs
RTCCR
RTC Control Register
118h
2 RTCSEL1 R/W 0
00: 01: 10: 11:
1 RTCSEL0 0
214/fs 213/fs 212/fs 211/fs
0 RTCRUN R/W 0
0: Stop & Clear 1: Run
RTCFC
RTC Function Control Register
119h
XTSEL R/W 0 0:Crystal 1:CR
-
-
-
-
-
-
XTEN R/W 0
Low frequency Oscillator (fs)
1:oscillation
92CD54I-334
2006-01-27
TMP92CD54I
6. Port Section Equivalent Circuit Diagram.
* Reading The Circuit Diagram Basically, the gate symbols written are the same as those used for the standard CMOS logic IC [74HCXX] series. The dedicated signal is described below. STOP: This signal becomes active "1" when the halt mode setting register is set to the Stop mode and the CPU executes the HALT instruction. When the drive enable bit is set to "1", however, Stop remains at "0". * The input protection resistance ranges from several tens of ohms to several hundreds of ohms.
P0 (D0 to D7), P4 (A0 to A7), P70, P71, P73 to P75, PC0 to PC5, PD0 to PD7, PF1(RXD0), PF2 (CTS0, SCLK0), PF4 (RXD1), PF5 ( CTS1, SCLK1), PF6 (TX), PF7 (RX), PM0 ( SS ), PN0 (SCK0), PN3 (SCK1), PM4 (SCK2)
VCC
Output Data
P-ch
VCC Output Enable STOP N-ch P-ch I/O N-ch
Input Data
Input Enable
P72 (SI2/SCL2), PF0 (TXD0), PF3 (TXD1), PM1 (MOSI), PM2 (MISO), PM3 (SECLK), PN1 (SO0/SDA0), PN2 (SI0/SCL0), PN4 (SO1/SDA1), PN5 (SI1/SCL1), PN6 (SO2/SDA2)
VCC Output Data P-ch
VCC Open Drain output enable Output Enable STOP Input Data N-ch P-ch I/O N-ch
Input Enable
92CD54I-335
2006-01-27
TMP92CD54I
PG(AN0 to 7), PL0 to 3(AN8 to 11)
VCC
Analog input channel select Analog input
P-ch P-ch Input N-ch N-ch
Input Data
Input Enable
INT0
INT0 Schmitt
Input
RESET
VCC VCC 100 k Typ. RESET Schmitt WDTOUT Reset Enable
P-ch
Input
N-ch
92CD54I-336
2006-01-27
TMP92CD54I
X1, X2
VCC
P-ch X2 clock oscillator N-ch
High frequency oscillation enable
P-ch
N-ch VCC
P-ch X1 N-ch
XT1, XT2
VCC
XT2 clock oscillator P-ch
P-ch
N-ch N-ch VCC
Low frequency oscillation enable P-ch
XT1
Type of low frequency oscillation select 0:Crystal 1:CR
N-ch
92CD54I-337
2006-01-27
TMP92CD54I
VREFH, VREFL
VCC
P-ch VREFH VREFON P-ch N-ch
S t ri n g R e sista n c e
VCC
P-ch VREFL N-ch
NMI
NMI Schmitt
Input
92CD54I-338
2006-01-27
TMP92CD54I
CLK
VCC Internal Reset VCC CLK P-ch P-ch Output Output Enable N-ch N-ch P-ch VCC
AM0 to 1, TEST0 to 1
VCC
P-ch Input Data N-ch Input
92CD54I-339
2006-01-27
TMP92CD54I
REGOUT
Regulator + BGR
VCC
BGR
+
P-ch Output
REGEN
VCC
VCC
P-ch Regulator Enable Input N-ch Input
92CD54I-340
2006-01-27
TMP92CD54I
7.
7.1
Points to Note and Restrictions
Notation
(1) The notation for built-in I/O registers is as follows register symbol Example: TRUN01 denotes bit T0RUN of register TRUN01. (2) Read-modify-write instructions (RMW) An instruction in which the CPU reads data from memory and writes the data to the same memory location in one instruction. Example 1: Example 2: * SET INC 3, (TRUN01); Set bit3 of TRUN01. 1, (400H); Increment the data at 400H.
Examples of read-modify-write instructions on the TLCS-900/H1 Exchange instruction EX (mem), R
Arithmetic operations ADD (mem), R/# SUB (mem), R/# INC #3, (mem) Logic operations AND (mem), R/# XOR (mem), R/# Bit manipulation operations STCF #3/A, (mem) SET #3, (mem) TSET #3, (mem) Rotate and shift operations RLC (mem) RL (mem) SLA (mem) SLL (mem) RLD (mem) . RRC RR SRA SRL (mem) (mem) (mem) (mem) RES #3, (mem) CHG #3, (mem) OR (mem), R/# ADC (mem), R/# SBC (mem), R/# DEC #3, (mem)
RRD (mem)
92CD54I-341
2006-01-27
TMP92CD54I
7.2
Points to Note
(1) Watchdog timer The watchdog timer starts operation immediately after a reset is released. When the watchdog timer is not to be used, disable it. (2) The stable time of the internal clock When releasing the external reset using "built-in clock doubler" until the internal reset is released, the requiring time to stabilize the circuit is automatically set. See section 3.1.2 "Reset Operation" for details. Also when releasing standby mode in STOP mode using an interrupt until the internal circuit starts the operation, the stable time of the oscillator is automatically input. See section 3.4 "Standby Function (3) STOP mode" for details. (3) Undefined bit in the built-in I/O register When reading the undefined bit in the built-in I/O register, the undefined value is output. Thus, when creating program, it should not be depending on this bit condition. (4) Reserved address areas The 16 bytes area (FFFFF0H to FFFFFFH) cannot be used for it is reserved as internal area. If using emulator, optional 64 Kbytes of 16M bytes area are used for control emulator. Therefore, if using emulator, its area cannot be used. (5) POP SR instruction Execute the POP SR instruction during DI condition.
92CD54I-342
2006-01-27
TMP92CD54I
8.
Package
Package DimensionsP-LQFP100-1414-0.50F
16.00.2 14.00.2 75 1.0TYP 76 50 51 Unit : mm
100
26
1
25 0.2 0.1
1.0TYP 0.5
1.40.2
14.00.2
0.08 M
16.00.2
1.85MAX
15.00.2
0.125 -0.05
+0.1
0~10 0.50.2
92CD54I-343
0.1 -0.1
+0.15
0.08
2006-01-27


▲Up To Search▲   

 
Price & Availability of TMP92CD54I

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X